org.springframework.security.oauth2.client.resource
Interface OAuth2ProtectedResourceDetails

All Known Implementing Classes:
AbstractRedirectResourceDetails, AuthorizationCodeResourceDetails, BaseOAuth2ProtectedResourceDetails, ClientCredentialsResourceDetails, ImplicitResourceDetails, OAuth2ContextConfiguration.ClientCredentials, OAuth2ContextConfiguration.Implicit, OAuth2ContextConfiguration.Password, ResourceOwnerPasswordResourceDetails

public interface OAuth2ProtectedResourceDetails

Details for an OAuth2-protected resource.

Author:
Ryan Heaton, Dave Syer

Method Summary
 String getAccessTokenUri()
          The URL to use to obtain an OAuth2 access token.
 AuthenticationScheme getAuthenticationScheme()
          Get the bearer token method for this resource.
 AuthenticationScheme 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.
 String getTokenName()
          The name of the bearer token.
 boolean isAuthenticationRequired()
          Whether a secret is required to obtain an access token to this resource.
 boolean isClientOnly()
          A flag to indicate that this resource is only to be used with client credentials, thus allowing access tokens to be cached independent of a user's session.
 boolean isScoped()
          Whether this resource is limited to a specific scope.
 

Method Detail

getId

String getId()
Get a unique identifier for these protected resource details.

Returns:
A unique identifier for these protected resource details.

getClientId

String getClientId()
The client identifier to use for this protected resource.

Returns:
The client identifier to use for this protected resource.

getAccessTokenUri

String getAccessTokenUri()
The URL to use to obtain an OAuth2 access token.

Returns:
The URL to use to obtain an OAuth2 access token.

isScoped

boolean isScoped()
Whether this resource is limited to a specific scope. If false, the scope of the authentication request will be ignored.

Returns:
Whether this resource is limited to a specific scope.

getScope

List<String> getScope()
The scope of this resource. Ignored if the resource isn't scoped.

Returns:
The scope of this resource.

isAuthenticationRequired

boolean isAuthenticationRequired()
Whether a secret is required to obtain an access token to this resource.

Returns:
Whether a secret is required to obtain an access token to this resource.

getClientSecret

String getClientSecret()
The client secret. Ignored if the secret isn't required.

Returns:
The client secret.

getClientAuthenticationScheme

AuthenticationScheme getClientAuthenticationScheme()
The scheme to use to authenticate the client. E.g. "header" or "query".

Returns:
The scheme used to authenticate the client.

getGrantType

String getGrantType()
The grant type for obtaining an acces token for this resource.

Returns:
The grant type for obtaining an acces token for this resource.

getAuthenticationScheme

AuthenticationScheme getAuthenticationScheme()
Get the bearer token method for this resource.

Returns:
The bearer token method for this resource.

getTokenName

String getTokenName()
The name of the bearer token. The default is "access_token", which is according to the spec, but some providers (e.g. Facebook) don't conform to the spec.)

Returns:
The name of the bearer token.

isClientOnly

boolean isClientOnly()
A flag to indicate that this resource is only to be used with client credentials, thus allowing access tokens to be cached independent of a user's session.

Returns:
true if this resource is only used with client credentials grant


Copyright © 2012. All Rights Reserved.