org.springframework.security.oauth2.provider
类 BaseClientDetails

java.lang.Object
  继承者 org.springframework.security.oauth2.provider.BaseClientDetails
所有已实现的接口:
Serializable, ClientDetails

public class BaseClientDetails
extends Object
implements ClientDetails

Base implementation of ClientDetails.

作者:
Ryan Heaton, Dave Syer
另请参见:
序列化表格

嵌套类摘要
static class BaseClientDetails.ArrayOrStringDeserializer
           
 
构造方法摘要
BaseClientDetails()
           
BaseClientDetails(ClientDetails prototype)
           
BaseClientDetails(String clientId, String resourceIds, String scopes, String grantTypes, String authorities)
           
BaseClientDetails(String clientId, String resourceIds, String scopes, String grantTypes, String authorities, String redirectUris)
           
 
方法摘要
 void addAdditionalInformation(String key, Object value)
           
 boolean equals(Object obj)
           
 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.
 int hashCode()
           
 boolean isScoped()
          Whether this client is limited to a specific scope.
 boolean isSecretRequired()
          Whether a secret is required to authenticate this client.
 void setAccessTokenValiditySeconds(Integer accessTokenValiditySeconds)
           
 void setAdditionalInformation(Map<String,?> additionalInformation)
           
 void setAuthorities(Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
           
 void setAuthorizedGrantTypes(Collection<String> authorizedGrantTypes)
           
 void setClientId(String clientId)
           
 void setClientSecret(String clientSecret)
           
 void setRefreshTokenValiditySeconds(Integer refreshTokenValiditySeconds)
           
 void setRegisteredRedirectUri(Set<String> registeredRedirectUris)
           
 void setResourceIds(Collection<String> resourceIds)
           
 void setScope(Collection<String> scope)
           
 String toString()
           
 
从类 java.lang.Object 继承的方法
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

构造方法详细信息

BaseClientDetails

public BaseClientDetails()

BaseClientDetails

public BaseClientDetails(ClientDetails prototype)

BaseClientDetails

public BaseClientDetails(String clientId,
                         String resourceIds,
                         String scopes,
                         String grantTypes,
                         String authorities)

BaseClientDetails

public BaseClientDetails(String clientId,
                         String resourceIds,
                         String scopes,
                         String grantTypes,
                         String authorities,
                         String redirectUris)
方法详细信息

getClientId

public String getClientId()
从接口 ClientDetails 复制的描述
The client id.

指定者:
接口 ClientDetails 中的 getClientId
返回:
The client id.

setClientId

public void setClientId(String clientId)

isSecretRequired

public boolean isSecretRequired()
从接口 ClientDetails 复制的描述
Whether a secret is required to authenticate this client.

指定者:
接口 ClientDetails 中的 isSecretRequired
返回:
Whether a secret is required to authenticate this client.

getClientSecret

public String getClientSecret()
从接口 ClientDetails 复制的描述
The client secret. Ignored if the secret isn't required.

指定者:
接口 ClientDetails 中的 getClientSecret
返回:
The client secret.

setClientSecret

public void setClientSecret(String clientSecret)

isScoped

public boolean isScoped()
从接口 ClientDetails 复制的描述
Whether this client is limited to a specific scope. If false, the scope of the authentication request will be ignored.

指定者:
接口 ClientDetails 中的 isScoped
返回:
Whether this client is limited to a specific scope.

getScope

public Set<String> getScope()
从接口 ClientDetails 复制的描述
The scope of this client. Empty if the client isn't scoped.

指定者:
接口 ClientDetails 中的 getScope
返回:
The scope of this client.

setScope

public void setScope(Collection<String> scope)

getResourceIds

public Set<String> getResourceIds()
从接口 ClientDetails 复制的描述
The resources that this client can access. Can be ignored by callers if empty.

指定者:
接口 ClientDetails 中的 getResourceIds
返回:
The resources of this client.

setResourceIds

public void setResourceIds(Collection<String> resourceIds)

getAuthorizedGrantTypes

public Set<String> getAuthorizedGrantTypes()
从接口 ClientDetails 复制的描述
The grant types for which this client is authorized.

指定者:
接口 ClientDetails 中的 getAuthorizedGrantTypes
返回:
The grant types for which this client is authorized.

setAuthorizedGrantTypes

public void setAuthorizedGrantTypes(Collection<String> authorizedGrantTypes)

getRegisteredRedirectUri

public Set<String> getRegisteredRedirectUri()
从接口 ClientDetails 复制的描述
The pre-defined redirect URI for this client to use during the "authorization_code" access grant. See OAuth spec, section 4.1.1.

指定者:
接口 ClientDetails 中的 getRegisteredRedirectUri
返回:
The pre-defined redirect URI for this client.

setRegisteredRedirectUri

public void setRegisteredRedirectUri(Set<String> registeredRedirectUris)

getAuthorities

public Collection<org.springframework.security.core.GrantedAuthority> getAuthorities()
从接口 ClientDetails 复制的描述
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.

指定者:
接口 ClientDetails 中的 getAuthorities
返回:
The authorities.

setAuthorities

public void setAuthorities(Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)

getAccessTokenValiditySeconds

public Integer getAccessTokenValiditySeconds()
从接口 ClientDetails 复制的描述
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).

指定者:
接口 ClientDetails 中的 getAccessTokenValiditySeconds
返回:
the access token validity period

setAccessTokenValiditySeconds

public void setAccessTokenValiditySeconds(Integer accessTokenValiditySeconds)

getRefreshTokenValiditySeconds

public Integer getRefreshTokenValiditySeconds()
从接口 ClientDetails 复制的描述
The refresh token validity period for this client. Zero or negative for default value set by token service.

指定者:
接口 ClientDetails 中的 getRefreshTokenValiditySeconds
返回:
the refresh token validity period

setRefreshTokenValiditySeconds

public void setRefreshTokenValiditySeconds(Integer refreshTokenValiditySeconds)

setAdditionalInformation

public void setAdditionalInformation(Map<String,?> additionalInformation)

getAdditionalInformation

public Map<String,Object> getAdditionalInformation()
从接口 ClientDetails 复制的描述
Additional information for this client, not neeed by the vanilla OAuth protocol but might be useful, for example, for storing descriptive information.

指定者:
接口 ClientDetails 中的 getAdditionalInformation
返回:
a map of additional information

addAdditionalInformation

public void addAdditionalInformation(String key,
                                     Object value)

hashCode

public int hashCode()
覆盖:
Object 中的 hashCode

equals

public boolean equals(Object obj)
覆盖:
Object 中的 equals

toString

public String toString()
覆盖:
Object 中的 toString


Copyright © 2013. All rights reserved.