org.springframework.security.oauth2.client.provider
Class BaseOAuth2ProtectedResourceDetails

java.lang.Object
  extended by org.springframework.security.oauth2.client.provider.BaseOAuth2ProtectedResourceDetails
All Implemented Interfaces:
OAuth2ProtectedResourceDetails
Direct Known Subclasses:
AuthorizationCodeResourceDetails

public class BaseOAuth2ProtectedResourceDetails
extends Object
implements OAuth2ProtectedResourceDetails

Author:
Ryan Heaton

Nested Class Summary
 
Nested classes/interfaces inherited from interface org.springframework.security.oauth2.client.OAuth2ProtectedResourceDetails
OAuth2ProtectedResourceDetails.BearerTokenMethod
 
Constructor Summary
BaseOAuth2ProtectedResourceDetails()
           
 
Method Summary
 boolean equals(Object o)
           
 String getAccessTokenUri()
          The URL to use to obtain an OAuth2 access token.
 OAuth2ProtectedResourceDetails.BearerTokenMethod getBearerTokenMethod()
          Get the bearer token method for this resource.
 String getBearerTokenName()
          The name of the bearer token.
 String getClientAuthenticationScheme()
          The scheme to use to authenticate the client.
 String getClientId()
          The client identifier to use for this protected resource.
 String getClientSecret()
          The client secret.
 String getGrantType()
          The grant type for obtaining an acces token for this resource.
 String getId()
          Get a unique identifier for these protected resource details.
 List<String> getScope()
          The scope of this resource.
 int hashCode()
           
 boolean isScoped()
          Whether this resource is limited to a specific scope.
 boolean isSecretRequired()
          Whether a secret is required to obtain an access token to this resource.
 void setAccessTokenUri(String accessTokenUri)
           
 void setBearerTokenMethod(OAuth2ProtectedResourceDetails.BearerTokenMethod bearerTokenMethod)
           
 void setBearerTokenName(String bearerTokenName)
           
 void setClientAuthenticationScheme(String clientAuthenticationScheme)
           
 void setClientId(String clientId)
           
 void setClientSecret(String clientSecret)
           
 void setGrantType(String grantType)
           
 void setId(String id)
           
 void setScope(List<String> scope)
           
 void setScoped(boolean scoped)
           
 void setSecretRequired(boolean secretRequired)
           
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BaseOAuth2ProtectedResourceDetails

public BaseOAuth2ProtectedResourceDetails()
Method Detail

getId

public String getId()
Description copied from interface: OAuth2ProtectedResourceDetails
Get a unique identifier for these protected resource details.

Specified by:
getId in interface OAuth2ProtectedResourceDetails
Returns:
A unique identifier for these protected resource details.

setId

public void setId(String id)

getClientId

public String getClientId()
Description copied from interface: OAuth2ProtectedResourceDetails
The client identifier to use for this protected resource.

Specified by:
getClientId in interface OAuth2ProtectedResourceDetails
Returns:
The client identifier to use for this protected resource.

setClientId

public void setClientId(String clientId)

getAccessTokenUri

public String getAccessTokenUri()
Description copied from interface: OAuth2ProtectedResourceDetails
The URL to use to obtain an OAuth2 access token.

Specified by:
getAccessTokenUri in interface OAuth2ProtectedResourceDetails
Returns:
The URL to use to obtain an OAuth2 access token.

setAccessTokenUri

public void setAccessTokenUri(String accessTokenUri)

isScoped

public boolean isScoped()
Description copied from interface: OAuth2ProtectedResourceDetails
Whether this resource is limited to a specific scope. If false, the scope of the authentication request will be ignored.

Specified by:
isScoped in interface OAuth2ProtectedResourceDetails
Returns:
Whether this resource is limited to a specific scope.

setScoped

public void setScoped(boolean scoped)

getScope

public List<String> getScope()
Description copied from interface: OAuth2ProtectedResourceDetails
The scope of this resource. Ignored if the resource isn't scoped.

Specified by:
getScope in interface OAuth2ProtectedResourceDetails
Returns:
The scope of this resource.

setScope

public void setScope(List<String> scope)

isSecretRequired

public boolean isSecretRequired()
Description copied from interface: OAuth2ProtectedResourceDetails
Whether a secret is required to obtain an access token to this resource.

Specified by:
isSecretRequired in interface OAuth2ProtectedResourceDetails
Returns:
Whether a secret is required to obtain an access token to this resource.

setSecretRequired

public void setSecretRequired(boolean secretRequired)

getClientSecret

public String getClientSecret()
Description copied from interface: OAuth2ProtectedResourceDetails
The client secret. Ignored if the secret isn't required.

Specified by:
getClientSecret in interface OAuth2ProtectedResourceDetails
Returns:
The client secret.

setClientSecret

public void setClientSecret(String clientSecret)

getClientAuthenticationScheme

public String getClientAuthenticationScheme()
Description copied from interface: OAuth2ProtectedResourceDetails
The scheme to use to authenticate the client. E.g. "header" or "query".

Specified by:
getClientAuthenticationScheme in interface OAuth2ProtectedResourceDetails
Returns:
The scheme used to authenticate the client.

setClientAuthenticationScheme

public void setClientAuthenticationScheme(String clientAuthenticationScheme)

getBearerTokenMethod

public OAuth2ProtectedResourceDetails.BearerTokenMethod getBearerTokenMethod()
Description copied from interface: OAuth2ProtectedResourceDetails
Get the bearer token method for this resource.

Specified by:
getBearerTokenMethod in interface OAuth2ProtectedResourceDetails
Returns:
The bearer token method for this resource.

setBearerTokenMethod

public void setBearerTokenMethod(OAuth2ProtectedResourceDetails.BearerTokenMethod bearerTokenMethod)

getBearerTokenName

public String getBearerTokenName()
Description copied from interface: OAuth2ProtectedResourceDetails
The name of the bearer token. The default is "bearer_token", which is according to the spec, but some providers (e.g. Facebook) don't conform to the spec.)

Specified by:
getBearerTokenName in interface OAuth2ProtectedResourceDetails
Returns:
The name of the bearer token.

setBearerTokenName

public void setBearerTokenName(String bearerTokenName)

getGrantType

public String getGrantType()
Description copied from interface: OAuth2ProtectedResourceDetails
The grant type for obtaining an acces token for this resource.

Specified by:
getGrantType in interface OAuth2ProtectedResourceDetails
Returns:
The grant type for obtaining an acces token for this resource.

setGrantType

public void setGrantType(String grantType)

equals

public boolean equals(Object o)
Overrides:
equals in class Object

hashCode

public int hashCode()
Overrides:
hashCode in class Object


Copyright © 2011. All Rights Reserved.