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()
ClientDetails
getClientId
in interface ClientDetails
public void setClientId(String clientId)
public void setAutoApproveScopes(Collection<String> autoApproveScopes)
public boolean isAutoApprove(String scope)
ClientDetails
isAutoApprove
in interface ClientDetails
scope
- the scope to considerpublic boolean isSecretRequired()
ClientDetails
isSecretRequired
in interface ClientDetails
public String getClientSecret()
ClientDetails
secret isn't required
.getClientSecret
in interface ClientDetails
public void setClientSecret(String clientSecret)
public boolean isScoped()
ClientDetails
isScoped
in interface ClientDetails
public Set<String> getScope()
ClientDetails
getScope
in interface ClientDetails
public void setScope(Collection<String> scope)
public Set<String> getResourceIds()
ClientDetails
getResourceIds
in interface ClientDetails
public void setResourceIds(Collection<String> resourceIds)
public Set<String> getAuthorizedGrantTypes()
ClientDetails
getAuthorizedGrantTypes
in interface ClientDetails
public void setAuthorizedGrantTypes(Collection<String> authorizedGrantTypes)
public Set<String> getRegisteredRedirectUri()
ClientDetails
getRegisteredRedirectUri
in interface ClientDetails
public Collection<org.springframework.security.core.GrantedAuthority> getAuthorities()
ClientDetails
null
.
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 ClientDetails
null
)public void setAuthorities(Collection<? extends org.springframework.security.core.GrantedAuthority> authorities)
public Integer getAccessTokenValiditySeconds()
ClientDetails
getAccessTokenValiditySeconds
in interface ClientDetails
public void setAccessTokenValiditySeconds(Integer accessTokenValiditySeconds)
public Integer getRefreshTokenValiditySeconds()
ClientDetails
getRefreshTokenValiditySeconds
in interface ClientDetails
public void setRefreshTokenValiditySeconds(Integer refreshTokenValiditySeconds)
public Map<String,Object> getAdditionalInformation()
ClientDetails
getAdditionalInformation
in interface ClientDetails
Copyright © 2019. All rights reserved.