java.lang.Object
org.springframework.security.oauth2.server.authorization.client.RegisteredClient
All Implemented Interfaces:
Serializable

public class RegisteredClient extends Object implements Serializable
A representation of a client registration with an OAuth 2.0 Authorization Server.
Since:
0.0.1
See Also:
  • Constructor Details

    • RegisteredClient

      protected RegisteredClient()
  • Method Details

    • getId

      public String getId()
      Returns the identifier for the registration.
      Returns:
      the identifier for the registration
    • getClientId

      public String getClientId()
      Returns the client identifier.
      Returns:
      the client identifier
    • getClientIdIssuedAt

      @Nullable public Instant getClientIdIssuedAt()
      Returns the time at which the client identifier was issued.
      Returns:
      the time at which the client identifier was issued
    • getClientSecret

      @Nullable public String getClientSecret()
      Returns the client secret or null if not available.
      Returns:
      the client secret or null if not available
    • getClientSecretExpiresAt

      @Nullable public Instant getClientSecretExpiresAt()
      Returns the time at which the client secret expires or null if it does not expire.
      Returns:
      the time at which the client secret expires or null if it does not expire
    • getClientName

      public String getClientName()
      Returns the client name.
      Returns:
      the client name
    • getClientAuthenticationMethods

      public Set<org.springframework.security.oauth2.core.ClientAuthenticationMethod> getClientAuthenticationMethods()
      Returns the authentication method(s) that the client may use.
      Returns:
      the Set of authentication method(s)
    • getAuthorizationGrantTypes

      public Set<org.springframework.security.oauth2.core.AuthorizationGrantType> getAuthorizationGrantTypes()
      Returns the authorization grant type(s) that the client may use.
      Returns:
      the Set of authorization grant type(s)
    • getRedirectUris

      public Set<String> getRedirectUris()
      Returns the redirect URI(s) that the client may use in redirect-based flows.
      Returns:
      the Set of redirect URI(s)
    • getPostLogoutRedirectUris

      public Set<String> getPostLogoutRedirectUris()
      Returns the post logout redirect URI(s) that the client may use for logout. The post_logout_redirect_uri parameter is used by the client when requesting that the End-User's User Agent be redirected to after a logout has been performed.
      Returns:
      the Set of post logout redirect URI(s)
      Since:
      1.1
    • getScopes

      public Set<String> getScopes()
      Returns the scope(s) that the client may use.
      Returns:
      the Set of scope(s)
    • getClientSettings

      public ClientSettings getClientSettings()
      Returns:
      the ClientSettings
    • getTokenSettings

      public TokenSettings getTokenSettings()
      Returns:
      the TokenSettings
    • equals

      public boolean equals(Object obj)
      Overrides:
      equals in class Object
    • hashCode

      public int hashCode()
      Overrides:
      hashCode in class Object
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • withId

      public static RegisteredClient.Builder withId(String id)
      Returns a new RegisteredClient.Builder, initialized with the provided registration identifier.
      Parameters:
      id - the identifier for the registration
      Returns:
      the RegisteredClient.Builder
    • from

      public static RegisteredClient.Builder from(RegisteredClient registeredClient)
      Returns a new RegisteredClient.Builder, initialized with the values from the provided RegisteredClient.
      Parameters:
      registeredClient - the RegisteredClient used for initializing the RegisteredClient.Builder
      Returns:
      the RegisteredClient.Builder