org.springframework.security.oauth2.client
Interface OAuth2ProtectedResourceDetails

All Known Implementing Classes:
AuthorizationCodeResourceDetails, BaseOAuth2ProtectedResourceDetails

public interface OAuth2ProtectedResourceDetails

Details for an OAuth2-protected resource.

Author:
Ryan Heaton

Nested Class Summary
static class OAuth2ProtectedResourceDetails.BearerTokenMethod
          Enumeration of possible methods for bearing the access token for this resource.
 
Method Summary
 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.
 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.
 

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.

isSecretRequired

boolean isSecretRequired()
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

String 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.

getBearerTokenMethod

OAuth2ProtectedResourceDetails.BearerTokenMethod getBearerTokenMethod()
Get the bearer token method for this resource.

Returns:
The bearer token method for this resource.

getBearerTokenName

String getBearerTokenName()
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.)

Returns:
The name of the bearer token.


Copyright © 2011. All Rights Reserved.