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

@Entity public class Client extends Object implements Serializable
Represents a registered third-party Client application
See Also:
  • Constructor Details

    • Client

      public Client()
    • Client

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

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

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

    • 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()
      Get the name of the third-party application this client represents
      Returns:
      the application name
    • setApplicationName

      public void setApplicationName(String applicationName)
      Set the name of the third-party application this client represents
      Parameters:
      applicationName - the name
    • getApplicationWebUri

      public String getApplicationWebUri()
      Get the public URI of the third-party application.
      Returns:
      the application URI
    • setApplicationWebUri

      public void setApplicationWebUri(String applicationWebUri)
      Set the public URI of the third-party application.
      Parameters:
      applicationWebUri - the application URI
    • getApplicationDescription

      public String getApplicationDescription()
      Get the description of the third-party application.
      Returns:
      the application description
    • setApplicationDescription

      public void setApplicationDescription(String applicationDescription)
      Set the description of the third-party application.
      Parameters:
      applicationDescription - the description
    • getApplicationLogoUri

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

      public void setApplicationLogoUri(String logoPath)
      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

      public List<String> getRedirectUris()
      Get a list of URIs the AuthorizationService may return the authorization code to
      Returns:
      the redirect uris
    • 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
    • getAllowedGrantTypes

      public List<String> 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

      public void setAllowedGrantTypes(List<String> allowedGrantTypes)
      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

      public UserSubject getSubject()
      Get the UserSubject representing this Client authentication
      Returns:
      the user subject
    • setSubject

      public void setSubject(UserSubject subject)
      Set the UserSubject representing 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

      public UserSubject getResourceOwnerSubject()
      Get the UserSubject representing the resource owner who has registered this client
      Returns:
      the resource owner user subject
    • setResourceOwnerSubject

      public void setResourceOwnerSubject(UserSubject resourceOwnerSubject)
      Set the UserSubject representing 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

      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
    • getApplicationCertificates

      public List<String> getApplicationCertificates()
    • setApplicationCertificates

      public void setApplicationCertificates(List<String> applicationCertificates)
    • getClientIpAddress

      public String getClientIpAddress()
    • setClientIpAddress

      public void setClientIpAddress(String clientIpAddress)
    • getRegisteredAt

      public long getRegisteredAt()
    • setRegisteredAt

      public void setRegisteredAt(long registeredAt)
    • getHomeRealm

      public String getHomeRealm()
    • setHomeRealm

      public void setHomeRealm(String homeRealm)
      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

      public String getApplicationLogoutUri()
    • setApplicationLogoutUri

      public void setApplicationLogoutUri(String applicationLogoutUri)
    • getTokenEndpointAuthMethod

      public String getTokenEndpointAuthMethod()
    • setTokenEndpointAuthMethod

      public void setTokenEndpointAuthMethod(String tokenEndpointAuthMethod)