public class AuthorizedClient extends Object implements Serializable
ClientDetails
for an
AuthorizationServer
.Constructor and Description |
---|
AuthorizedClient() |
Modifier and Type | Method and Description |
---|---|
protected boolean |
canEqual(Object other) |
boolean |
equals(Object o) |
String |
getApplicationId()
Populated if this authorized client is used for authorizing customer users in a certain
application.
|
Map<String,Object> |
getAttributes()
Additional attributes for this client, not needed by the vanilla OAuth protocol but might be
useful, for example, for storing descriptive information.
|
String |
getClientId()
The OAuth2 client ID for this authorized client.
|
String |
getClientSecret()
The encrypted OAuth2 client secret for this authorized client.
|
String |
getDefaultRedirectUri()
The default redirect URI to use if a user accesses a login page without a valid redirect
cookie
|
String |
getFriendlyName()
The friendly name of this authorized client.
|
Set<String> |
getGrantTypes()
The grant types for which this client is authorized.
|
String |
getId()
The primary key of this authorized client.
|
Set<String> |
getPermissions()
Returns the permissions that are granted to the OAuth client.
|
Set<String> |
getRedirectUris()
The pre-defined redirect URIs for this client to use during the "authorization_code" access
grant.
|
Integer |
getRefreshTokenTimeoutSeconds()
The period of time, in seconds, that an refresh token issued will be valid for.
|
Set<String> |
getResourceIds()
The resources that this client can access.
|
Set<String> |
getScopes()
The scopes for this client.
|
String |
getServerId()
The ID of the authorization server this authorized client is part of.
|
Integer |
getTokenTimeoutSeconds()
The period of time, in seconds, that an access token issued will be valid for.
|
int |
hashCode() |
boolean |
isAdmin()
Whether or not this authorized client is used for authorizing admin users.
|
void |
setAdmin(boolean isAdmin)
Whether or not this authorized client is used for authorizing admin users.
|
void |
setApplicationId(String applicationId)
Populated if this authorized client is used for authorizing customer users in a certain
application.
|
void |
setAttributes(Map<String,Object> attributes)
Additional attributes for this client, not needed by the vanilla OAuth protocol but might be
useful, for example, for storing descriptive information.
|
void |
setClientId(String clientId)
The OAuth2 client ID for this authorized client.
|
void |
setClientSecret(String clientSecret)
The encrypted OAuth2 client secret for this authorized client.
|
void |
setDefaultRedirectUri(String defaultRedirectUri)
The default redirect URI to use if a user accesses a login page without a valid redirect
cookie
|
void |
setFriendlyName(String friendlyName)
The friendly name of this authorized client.
|
void |
setGrantTypes(Set<String> grantTypes)
The grant types for which this client is authorized.
|
void |
setId(String id)
The primary key of this authorized client.
|
void |
setPermissions(Set<String> permissions)
Returns the permissions that are granted to the OAuth client.
|
void |
setRedirectUris(Set<String> redirectUris)
The pre-defined redirect URIs for this client to use during the "authorization_code" access
grant.
|
void |
setRefreshTokenTimeoutSeconds(Integer refreshTokenTimeoutSeconds)
The period of time, in seconds, that an refresh token issued will be valid for.
|
void |
setResourceIds(Set<String> resourceIds)
The resources that this client can access.
|
void |
setScopes(Set<String> scopes)
The scopes for this client.
|
void |
setServerId(String serverId)
The ID of the authorization server this authorized client is part of.
|
void |
setTokenTimeoutSeconds(Integer tokenTimeoutSeconds)
The period of time, in seconds, that an access token issued will be valid for.
|
org.springframework.security.oauth2.provider.ClientDetails |
toClientDetails()
Convert this authorized client to a
ClientDetails . |
String |
toString() |
public org.springframework.security.oauth2.provider.ClientDetails toClientDetails()
ClientDetails
.public String getId()
public String getServerId()
public String getFriendlyName()
public String getClientId()
public String getClientSecret()
public Integer getTokenTimeoutSeconds()
public Integer getRefreshTokenTimeoutSeconds()
public Set<String> getResourceIds()
public Set<String> getGrantTypes()
public Set<String> getRedirectUris()
Any of these values may be relative, and if so, the DefaultClientDetailsService
will
use the TenantUrlResolver
to determine the base URL to resolve them against such that
ultimately they are absolute. If resolution to an absolute URL fails for whatever reason, the
relative URL will be omitted from the final ClientDetails.getRegisteredRedirectUri()
.
DefaultClientDetailsService
,
TenantUrlResolver
public Set<String> getScopes()
public Set<String> getPermissions()
null
. Note that these are NOT the permissions that are granted to the user with
an authorized access token. Instead, these permissions are inherent to the client itself.null
)public String getApplicationId()
public Map<String,Object> getAttributes()
public String getDefaultRedirectUri()
public void setId(String id)
id
- the primary keypublic void setServerId(String serverId)
serverId
- the authorization server IDpublic void setFriendlyName(String friendlyName)
friendlyName
- the friendly namepublic void setClientId(String clientId)
clientId
- the client IDpublic void setClientSecret(String clientSecret)
clientSecret
- the encrypted client secretpublic void setTokenTimeoutSeconds(Integer tokenTimeoutSeconds)
tokenTimeoutSeconds
- the timeout in secondspublic void setRefreshTokenTimeoutSeconds(Integer refreshTokenTimeoutSeconds)
tokenTimeoutSeconds
- the timeout in secondspublic void setResourceIds(Set<String> resourceIds)
resourceIds
- the resource IDspublic void setGrantTypes(Set<String> grantTypes)
grantTypes
- the grant typespublic void setRedirectUris(Set<String> redirectUris)
Any of these values may be relative, and if so, the DefaultClientDetailsService
will
use the TenantUrlResolver
to determine the base URL to resolve them against such that
ultimately they are absolute. If resolution to an absolute URL fails for whatever reason, the
relative URL will be omitted from the final ClientDetails.getRegisteredRedirectUri()
.
redirectUris
- the redirect URIsDefaultClientDetailsService
,
TenantUrlResolver
public void setScopes(Set<String> scopes)
scopes
- the scopespublic void setPermissions(Set<String> permissions)
null
. Note that these are NOT the permissions that are granted to the user with
an authorized access token. Instead, these permissions are inherent to the client itself.permissions
- the permissionspublic void setAdmin(boolean isAdmin)
isAdmin
- whether or not this authorized client is for admin userspublic void setApplicationId(String applicationId)
applicationId
- the application ID this client is used inpublic void setAttributes(Map<String,Object> attributes)
attributes
- the additional attributespublic void setDefaultRedirectUri(String defaultRedirectUri)
defaultRedirectUri
- the default fallback URI to use for this clientprotected boolean canEqual(Object other)
public boolean isAdmin()
Copyright © 2021. All rights reserved.