public class BaseClientDetails extends Object implements ClientDetails
ClientDetails.| Constructor and Description |
|---|
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) |
| Modifier and Type | Method and Description |
|---|---|
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 needed by the vanilla OAuth protocol but might be useful, for example,
for storing descriptive information.
|
Collection<org.springframework.security.core.GrantedAuthority> |
getAuthorities()
Returns the authorities that are granted to the OAuth client.
|
Set<String> |
getAuthorizedGrantTypes()
The grant types for which this client is authorized.
|
Set<String> |
getAutoApproveScopes() |
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 |
isAutoApprove(String scope)
Test whether client needs user approval for a particular scope.
|
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 |
setAutoApproveScopes(Collection<String> autoApproveScopes) |
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() |
public BaseClientDetails()
public BaseClientDetails(ClientDetails prototype)
public BaseClientDetails(String clientId, String resourceIds, String scopes, String grantTypes, String authorities)
public String getClientId()
ClientDetailsgetClientId in interface ClientDetailspublic void setClientId(String clientId)
public void setAutoApproveScopes(Collection<String> autoApproveScopes)
public boolean isAutoApprove(String scope)
ClientDetailsisAutoApprove in interface ClientDetailsscope - the scope to considerpublic boolean isSecretRequired()
ClientDetailsisSecretRequired in interface ClientDetailspublic String getClientSecret()
ClientDetailssecret isn't required.getClientSecret in interface ClientDetailspublic void setClientSecret(String clientSecret)
public boolean isScoped()
ClientDetailsisScoped in interface ClientDetailspublic Set<String> getScope()
ClientDetailsgetScope in interface ClientDetailspublic void setScope(Collection<String> scope)
public Set<String> getResourceIds()
ClientDetailsgetResourceIds in interface ClientDetailspublic void setResourceIds(Collection<String> resourceIds)
public Set<String> getAuthorizedGrantTypes()
ClientDetailsgetAuthorizedGrantTypes in interface ClientDetailspublic void setAuthorizedGrantTypes(Collection<String> authorizedGrantTypes)
public Set<String> getRegisteredRedirectUri()
ClientDetailsgetRegisteredRedirectUri in interface ClientDetailspublic Collection<org.springframework.security.core.GrantedAuthority> getAuthorities()
ClientDetailsnull.
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.getAuthorities in interface ClientDetailsnull)public void setAuthorities(Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
public Integer getAccessTokenValiditySeconds()
ClientDetailsgetAccessTokenValiditySeconds in interface ClientDetailspublic void setAccessTokenValiditySeconds(Integer accessTokenValiditySeconds)
public Integer getRefreshTokenValiditySeconds()
ClientDetailsgetRefreshTokenValiditySeconds in interface ClientDetailspublic void setRefreshTokenValiditySeconds(Integer refreshTokenValiditySeconds)
public Map<String,Object> getAdditionalInformation()
ClientDetailsgetAdditionalInformation in interface ClientDetailsCopyright © 2019. All rights reserved.