org.springframework.security.oauth2.client.token.grant.redirect
Class AbstractRedirectResourceDetails

java.lang.Object
  extended by org.springframework.security.oauth2.client.resource.BaseOAuth2ProtectedResourceDetails
      extended by org.springframework.security.oauth2.client.token.grant.redirect.AbstractRedirectResourceDetails
All Implemented Interfaces:
OAuth2ProtectedResourceDetails
Direct Known Subclasses:
AuthorizationCodeResourceDetails, ImplicitResourceDetails

public abstract class AbstractRedirectResourceDetails
extends BaseOAuth2ProtectedResourceDetails

Author:
Dave Syer

Constructor Summary
AbstractRedirectResourceDetails()
           
 
Method Summary
 String getPreEstablishedRedirectUri()
          The redirect URI that has been pre-established with the server.
 String getRedirectUri(AccessTokenRequest request)
          Extract a redirect uri from the resource and/or the current request.
 String getUserAuthorizationUri()
          The URI to which the user is to be redirected to authorize an access token.
 boolean isUseCurrentUri()
          Flag to signal that the current URI (if set) in the request should be used in preference to the pre-established redirect URI.
 void setPreEstablishedRedirectUri(String preEstablishedRedirectUri)
          The redirect URI that has been pre-established with the server.
 void setUseCurrentUri(boolean useCurrentUri)
          Flag to signal that the current URI (if set) in the request should be used in preference to the pre-established redirect URI.
 void setUserAuthorizationUri(String userAuthorizationUri)
          The URI to which the user is to be redirected to authorize an access token.
 
Methods inherited from class org.springframework.security.oauth2.client.resource.BaseOAuth2ProtectedResourceDetails
equals, getAccessTokenUri, getAuthenticationScheme, getClientAuthenticationScheme, getClientId, getClientSecret, getGrantType, getId, getScope, getTokenName, hashCode, isAuthenticationRequired, isClientOnly, isScoped, setAccessTokenUri, setAuthenticationScheme, setClientAuthenticationScheme, setClientId, setClientSecret, setGrantType, setId, setScope, setTokenName
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AbstractRedirectResourceDetails

public AbstractRedirectResourceDetails()
Method Detail

setUseCurrentUri

public void setUseCurrentUri(boolean useCurrentUri)
Flag to signal that the current URI (if set) in the request should be used in preference to the pre-established redirect URI.

Parameters:
useCurrentUri - the flag value to set (default true)

isUseCurrentUri

public boolean isUseCurrentUri()
Flag to signal that the current URI (if set) in the request should be used in preference to the pre-established redirect URI.

Returns:
the flag value

getUserAuthorizationUri

public String getUserAuthorizationUri()
The URI to which the user is to be redirected to authorize an access token.

Returns:
The URI to which the user is to be redirected to authorize an access token.

setUserAuthorizationUri

public void setUserAuthorizationUri(String userAuthorizationUri)
The URI to which the user is to be redirected to authorize an access token.

Parameters:
userAuthorizationUri - The URI to which the user is to be redirected to authorize an access token.

getPreEstablishedRedirectUri

public String getPreEstablishedRedirectUri()
The redirect URI that has been pre-established with the server. If present, the redirect URI will be omitted from the user authorization request because the server doesn't need to know it.

Returns:
The redirect URI that has been pre-established with the server.

setPreEstablishedRedirectUri

public void setPreEstablishedRedirectUri(String preEstablishedRedirectUri)
The redirect URI that has been pre-established with the server. If present, the redirect URI will be omitted from the user authorization request because the server doesn't need to know it.

Parameters:
preEstablishedRedirectUri - The redirect URI that has been pre-established with the server.

getRedirectUri

public String getRedirectUri(AccessTokenRequest request)
Extract a redirect uri from the resource and/or the current request.

Parameters:
request - the current DefaultAccessTokenRequest
Returns:
a redirect uri if one can be established


Copyright © 2013. All rights reserved.