org.springframework.security.oauth2.provider.endpoint
类 DefaultRedirectResolver

java.lang.Object
  继承者 org.springframework.security.oauth2.provider.endpoint.DefaultRedirectResolver
所有已实现的接口:
RedirectResolver
直接已知子类:
ExactMatchRedirectResolver

public class DefaultRedirectResolver
extends Object
implements RedirectResolver

Default implementation for a redirect resolver.

作者:
Ryan Heaton, Dave Syer

构造方法摘要
DefaultRedirectResolver()
           
 
方法摘要
protected  boolean hostMatches(String registered, String requested)
          Check if host matches the registered value.
protected  boolean redirectMatches(String requestedRedirect, String redirectUri)
          Whether the requested redirect URI "matches" the specified redirect URI.
 String resolveRedirect(String requestedRedirect, ClientDetails client)
          Resolve the redirect for the specified client.
 void setMatchSubdomains(boolean matchSubdomains)
          Flag to indicate that requested URIs will match if they are a subdomain of the registered value.
 void setRedirectGrantTypes(Collection<String> redirectGrantTypes)
          Grant types that are permitted to have a redirect uri.
 
从类 java.lang.Object 继承的方法
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

构造方法详细信息

DefaultRedirectResolver

public DefaultRedirectResolver()
方法详细信息

setMatchSubdomains

public void setMatchSubdomains(boolean matchSubdomains)
Flag to indicate that requested URIs will match if they are a subdomain of the registered value.

参数:
matchSubdomains - the flag value to set (deafult true)

setRedirectGrantTypes

public void setRedirectGrantTypes(Collection<String> redirectGrantTypes)
Grant types that are permitted to have a redirect uri.

参数:
redirectGrantTypes - the redirect grant types to set

resolveRedirect

public String resolveRedirect(String requestedRedirect,
                              ClientDetails client)
                       throws OAuth2Exception
从接口 RedirectResolver 复制的描述
Resolve the redirect for the specified client.

指定者:
接口 RedirectResolver 中的 resolveRedirect
参数:
requestedRedirect - The redirect that was requested (may not be null).
client - The client for which we're resolving the redirect.
返回:
The resolved redirect URI.
抛出:
OAuth2Exception - If the requested redirect is invalid for the specified client.

redirectMatches

protected boolean redirectMatches(String requestedRedirect,
                                  String redirectUri)
Whether the requested redirect URI "matches" the specified redirect URI. For a URL, this implementation tests if the user requested redirect starts with the registered redirect, so it would have the same host and root path if it is an HTTP URL.

For other (non-URL) cases, such as for some implicit clients, the redirect_uri must be an exact match.

参数:
requestedRedirect - The requested redirect URI.
redirectUri - The registered redirect URI.
返回:
Whether the requested redirect URI "matches" the specified redirect URI.

hostMatches

protected boolean hostMatches(String registered,
                              String requested)
Check if host matches the registered value.

参数:
registered - the registered host
requested - the requested host
返回:
true if they match


Copyright © 2013. All rights reserved.