Class Client
java.lang.Object
org.apache.cxf.rs.security.oauth2.common.Client
- All Implemented Interfaces:
Serializable
Represents a registered third-party Client application
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionGet the list of access token grant types this client can use to obtain the access tokens.Get the description of the third-party application.Get the URI pointing to a logo image of the client applicationGet the name of the third-party application this client representsGet the public URI of the third-party application.Get the client registration idGet the client secretGet the list of additional client propertiesGet a list of URIs the AuthorizationService may return the authorization code tolongGet the list of registered scopesGet theUserSubjectrepresenting the resource owner who has registered this clientGet theUserSubjectrepresenting this Client authenticationbooleanGet the confidentiality status of this client application.booleanvoidsetAllowedGrantTypes(List<String> allowedGrantTypes) Set the list of access token grant types this client can use to obtain the access tokens.voidsetApplicationCertificates(List<String> applicationCertificates) voidsetApplicationDescription(String applicationDescription) Set the description of the third-party application.voidsetApplicationLogoUri(String logoPath) Set the URI pointing to a logo image of the client applicationvoidsetApplicationLogoutUri(String applicationLogoutUri) voidsetApplicationName(String applicationName) Set the name of the third-party application this client representsvoidsetApplicationWebUri(String applicationWebUri) Set the public URI of the third-party application.voidsetClientId(String id) voidsetClientIpAddress(String clientIpAddress) voidvoidsetConfidential(boolean isConf) Set the confidentiality status of this client application.voidsetHomeRealm(String homeRealm) Hint to the authentication system how the users redirected by this client need to be authenticatedvoidsetProperties(Map<String, String> properties) Set the list of additional client propertiesvoidsetRedirectUris(List<String> redirectUris) Sets a list of URIs the AuthorizationService may return the authorization code to.voidsetRegisteredAt(long registeredAt) voidsetRegisteredAudiences(List<String> registeredAudiences) Set the list of registered audiencesvoidsetRegisteredDynamically(boolean registeredDynamically) voidsetRegisteredScopes(List<String> registeredScopes) Set the list of registered scopes.voidsetResourceOwnerSubject(UserSubject resourceOwnerSubject) Set theUserSubjectrepresenting the resource owner who has registered this client.voidsetSubject(UserSubject subject) Set theUserSubjectrepresenting this Client authentication.voidsetTokenEndpointAuthMethod(String tokenEndpointAuthMethod)
-
Constructor Details
-
Client
public Client() -
Client
-
Client
-
Client
-
-
Method Details
-
getClientId
Get the client registration id- Returns:
- the consumer key
-
setClientId
-
getClientSecret
Get the client secret- Returns:
- the consumer key
-
setClientSecret
-
getApplicationName
Get the name of the third-party application this client represents- Returns:
- the application name
-
setApplicationName
Set the name of the third-party application this client represents- Parameters:
applicationName- the name
-
getApplicationWebUri
Get the public URI of the third-party application.- Returns:
- the application URI
-
setApplicationWebUri
Set the public URI of the third-party application.- Parameters:
applicationWebUri- the application URI
-
getApplicationDescription
Get the description of the third-party application.- Returns:
- the application description
-
setApplicationDescription
Set the description of the third-party application.- Parameters:
applicationDescription- the description
-
getApplicationLogoUri
Get the URI pointing to a logo image of the client application- Returns:
- the logo URI
-
setApplicationLogoUri
Set the URI pointing to a logo image of the client application- Parameters:
logoPath- the logo URI
-
isConfidential
public boolean isConfidential()Get the confidentiality status of this client application.- Returns:
- the confidentiality status
-
setConfidential
public void setConfidential(boolean isConf) Set the confidentiality status of this client application. This can be used to restrict which OAuth2 flows this client can participate in.- Parameters:
isConf- true if the client is confidential
-
getRedirectUris
Get a list of URIs the AuthorizationService may return the authorization code to- Returns:
- the redirect uris
-
setRedirectUris
Sets a list of URIs the AuthorizationService may return the authorization code to.- Parameters:
redirectUris- the redirect uris
-
getAllowedGrantTypes
Get the list of access token grant types this client can use to obtain the access tokens.- Returns:
- the list of grant types
-
setAllowedGrantTypes
Set the list of access token grant types this client can use to obtain the access tokens.- Parameters:
allowedGrantTypes- the list of grant types
-
getSubject
Get theUserSubjectrepresenting this Client authentication- Returns:
- the user subject
-
setSubject
Set theUserSubjectrepresenting this Client authentication. This property may be set during the registration in cases where a 3rd party client needs to authenticate first before registering as OAuth2 client. This property may also wrap a clientId in cases where a client credentials flow is used- Parameters:
subject- the user subject
-
getResourceOwnerSubject
Get theUserSubjectrepresenting the resource owner who has registered this client- Returns:
- the resource owner user subject
-
setResourceOwnerSubject
Set theUserSubjectrepresenting the resource owner who has registered this client. This property may be set in cases where each account (resource) owner registers account specific Clients- Parameters:
resourceOwnerSubject- the resource owner user subject
-
getProperties
Get the list of additional client properties- Returns:
- the list of properties
-
setProperties
Set the list of additional client properties- Parameters:
properties- the properties
-
getRegisteredScopes
Get the list of registered scopes- Returns:
- scopes
-
setRegisteredScopes
Set the list of registered scopes. Registering the scopes will allow the clients not to include the scopes and delegate to the runtime to enforce that the current request scopes are a subset of the pre-registered scopes. Client Registration service is expected to reject unknown scopes.- Parameters:
registeredScopes- the scopes
-
getRegisteredAudiences
-
setRegisteredAudiences
Set the list of registered audiences- Parameters:
registeredAudiences- audiences
-
getApplicationCertificates
-
setApplicationCertificates
-
getClientIpAddress
-
setClientIpAddress
-
getRegisteredAt
public long getRegisteredAt() -
setRegisteredAt
public void setRegisteredAt(long registeredAt) -
getHomeRealm
-
setHomeRealm
Hint to the authentication system how the users redirected by this client need to be authenticated- Parameters:
homeRealm- user home realm
-
isRegisteredDynamically
public boolean isRegisteredDynamically() -
setRegisteredDynamically
public void setRegisteredDynamically(boolean registeredDynamically) -
getApplicationLogoutUri
-
setApplicationLogoutUri
-
getTokenEndpointAuthMethod
-
setTokenEndpointAuthMethod
-