org.springframework.security.oauth2.provider
Interface ClientDetails

All Superinterfaces:
Serializable
All Known Implementing Classes:
BaseClientDetails

public interface ClientDetails
extends Serializable

Client details for OAuth 2

Author:
Ryan Heaton

Method Summary
 Integer getAccessTokenValiditySeconds()
          The access token validity period for this client.
 Map<String,Object> getAdditionalInformation()
          Additional information for this client, not neeed by the vanilla OAuth protocol but might be useful, for example, for storing descriptive information.
 Collection<org.springframework.security.core.GrantedAuthority> getAuthorities()
          Get the authorities that are granted to the OAuth client.
 Set<String> getAuthorizedGrantTypes()
          The grant types for which this client is authorized.
 String getClientId()
          The client id.
 String getClientSecret()
          The client secret.
 Integer getRefreshTokenValiditySeconds()
          The refresh token validity period for this client.
 Set<String> getRegisteredRedirectUri()
          The pre-defined redirect URI for this client to use during the "authorization_code" access grant.
 Set<String> getResourceIds()
          The resources that this client can access.
 Set<String> getScope()
          The scope of this client.
 boolean isScoped()
          Whether this client is limited to a specific scope.
 boolean isSecretRequired()
          Whether a secret is required to authenticate this client.
 

Method Detail

getClientId

String getClientId()
The client id.

Returns:
The client id.

getResourceIds

Set<String> getResourceIds()
The resources that this client can access. Can be ignored by callers if empty.

Returns:
The resources of this client.

isSecretRequired

boolean isSecretRequired()
Whether a secret is required to authenticate this client.

Returns:
Whether a secret is required to authenticate this client.

getClientSecret

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

Returns:
The client secret.

isScoped

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

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

getScope

Set<String> getScope()
The scope of this client. Empty if the client isn't scoped.

Returns:
The scope of this client.

getAuthorizedGrantTypes

Set<String> getAuthorizedGrantTypes()
The grant types for which this client is authorized.

Returns:
The grant types for which this client is authorized.

getRegisteredRedirectUri

Set<String> getRegisteredRedirectUri()
The pre-defined redirect URI for this client to use during the "authorization_code" access grant. See OAuth spec, section 4.1.1.

Returns:
The pre-defined redirect URI for this client.

getAuthorities

Collection<org.springframework.security.core.GrantedAuthority> getAuthorities()
Get the authorities that are granted to the OAuth client. Note that these are NOT the authorities that are granted to the user with an authorized access token. Instead, these authorities are inherent to the client itself.

Returns:
The authorities.

getAccessTokenValiditySeconds

Integer getAccessTokenValiditySeconds()
The access token validity period for this client. Null if not set explicitly (implementations might use that fact to provide a default value for instance).

Returns:
the access token validity period

getRefreshTokenValiditySeconds

Integer getRefreshTokenValiditySeconds()
The refresh token validity period for this client. Zero or negative for default value set by token service.

Returns:
the refresh token validity period

getAdditionalInformation

Map<String,Object> getAdditionalInformation()
Additional information for this client, not neeed by the vanilla OAuth protocol but might be useful, for example, for storing descriptive information.

Returns:
a map of additional information


Copyright © 2012. All Rights Reserved.