Apache CXF API

org.apache.cxf.rs.security.oauth2.common
Class Client

java.lang.Object
  extended by org.apache.cxf.rs.security.oauth2.common.Client
All Implemented Interfaces:
Serializable

public class Client
extends Object
implements Serializable

Represents a registered third-party Client application

See Also:
Serialized Form

Constructor Summary
Client()
           
Client(String clientId, String clientSecret, boolean isConfidential)
           
Client(String clientId, String clientSecret, boolean isConfidential, String applicationName, String applicationWebUri)
           
 
Method Summary
 List<String> getAllowedGrantTypes()
          Gets the list of access token grant types this client can use to obtain the access tokens.
 String getApplicationCertificate()
           
 String getApplicationDescription()
          Gets the description of the third-party application.
 String getApplicationLogoUri()
          Get the URI pointing to a logo image of the client application
 String getApplicationName()
          Gets the name of the third-party application this client represents
 String getApplicationWebUri()
          Gets the public URI of the third-party application.
 String getClientId()
          Get the client registration id
 String getClientSecret()
          Get the client secret
 Map<String,String> getProperties()
          Get the list of additional client properties
 List<String> getRedirectUris()
          Gets a list of URIs the AuthorizationService may return the authorization code to
 List<String> getRegisteredAudiences()
           
 List<String> getRegisteredScopes()
          Get the list of registered scopes
 UserSubject getSubject()
          Gets the UserSubject representing this Client authentication
 boolean isConfidential()
          Gets the confidentiality status of this client application.
 void setAllowedGrantTypes(List<String> allowedGrantTypes)
          Sets the list of access token grant types this client can use to obtain the access tokens.
 void setApplicationCertificate(String applicationCertificate)
           
 void setApplicationDescription(String applicationDescription)
          Sets the description of the third-party application.
 void setApplicationLogoUri(String logoPath)
          Sets the URI pointing to a logo image of the client application
 void setApplicationName(String applicationName)
          Sets the name of the third-party application this client represents
 void setApplicationWebUri(String applicationWebUri)
          Sets the public URI of the third-party application.
 void setClientId(String id)
           
 void setClientSecret(String id)
           
 void setConfidential(boolean isConf)
          Sets the confidentiality status of this client application.
 void setProperties(Map<String,String> properties)
          Set the list of additional client properties
 void setRedirectUris(List<String> redirectUris)
          Sets a list of URIs the AuthorizationService may return the authorization code to.
 void setRegisteredAudiences(List<String> registeredAudiences)
          Set the list of registered audiences
 void setRegisteredScopes(List<String> registeredScopes)
          Set the list of registered scopes.
 void setSubject(UserSubject subject)
          Sets the UserSubject representing this Client authentication, may be setup during the registration.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Client

public Client()

Client

public Client(String clientId,
              String clientSecret,
              boolean isConfidential)

Client

public Client(String clientId,
              String clientSecret,
              boolean isConfidential,
              String applicationName,
              String applicationWebUri)
Method Detail

getClientId

public String getClientId()
Get the client registration id

Returns:
the consumer key

setClientId

public void setClientId(String id)

getClientSecret

public String getClientSecret()
Get the client secret

Returns:
the consumer key

setClientSecret

public void setClientSecret(String id)

getApplicationName

public String getApplicationName()
Gets the name of the third-party application this client represents

Returns:
the application name

setApplicationName

public void setApplicationName(String applicationName)
Sets the name of the third-party application this client represents

Parameters:
applicationName - the name

getApplicationWebUri

public String getApplicationWebUri()
Gets the public URI of the third-party application.

Returns:
the application URI

setApplicationWebUri

public void setApplicationWebUri(String applicationWebUri)
Sets the public URI of the third-party application.

Parameters:
applicationWebUri - the application URI

setApplicationDescription

public void setApplicationDescription(String applicationDescription)
Sets the description of the third-party application.

Parameters:
applicationDescription - the description

getApplicationDescription

public String getApplicationDescription()
Gets the description of the third-party application.

Returns:
the application description

setApplicationLogoUri

public void setApplicationLogoUri(String logoPath)
Sets the URI pointing to a logo image of the client application

Parameters:
logoPath - the logo URI

getApplicationLogoUri

public String getApplicationLogoUri()
Get the URI pointing to a logo image of the client application

Returns:
the logo URI

setConfidential

public void setConfidential(boolean isConf)
Sets 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

isConfidential

public boolean isConfidential()
Gets the confidentiality status of this client application.

Returns:
the confidentiality status

setRedirectUris

public void setRedirectUris(List<String> redirectUris)
Sets a list of URIs the AuthorizationService may return the authorization code to.

Parameters:
redirectUris - the redirect uris

getRedirectUris

public List<String> getRedirectUris()
Gets a list of URIs the AuthorizationService may return the authorization code to

Returns:
the redirect uris

setAllowedGrantTypes

public void setAllowedGrantTypes(List<String> allowedGrantTypes)
Sets the list of access token grant types this client can use to obtain the access tokens.

Parameters:
allowedGrantTypes - the list of grant types

getAllowedGrantTypes

public List<String> getAllowedGrantTypes()
Gets the list of access token grant types this client can use to obtain the access tokens.

Returns:
the list of grant types

setSubject

public void setSubject(UserSubject subject)
Sets the UserSubject representing this Client authentication, may be setup during the registration.

Parameters:
subject - the user subject

getSubject

public UserSubject getSubject()
Gets the UserSubject representing this Client authentication

Returns:
the user subject

getProperties

public Map<String,String> getProperties()
Get the list of additional client properties

Returns:
the list of properties

setProperties

public void setProperties(Map<String,String> properties)
Set the list of additional client properties

Parameters:
properties - the properties

getRegisteredScopes

public List<String> getRegisteredScopes()
Get the list of registered scopes

Returns:
scopes

setRegisteredScopes

public void setRegisteredScopes(List<String> registeredScopes)
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

public List<String> getRegisteredAudiences()

setRegisteredAudiences

public void setRegisteredAudiences(List<String> registeredAudiences)
Set the list of registered audiences

Parameters:
registeredAudiences - audiences

getApplicationCertificate

public String getApplicationCertificate()

setApplicationCertificate

public void setApplicationCertificate(String applicationCertificate)

Apache CXF API

Apache CXF