Class ClientCredentials

java.lang.Object
com.sap.cloud.security.config.ClientCredentials
All Implemented Interfaces:
ClientIdentity, Serializable

public class ClientCredentials extends Object implements ClientIdentity, Serializable
See Also:
  • Constructor Details

    • ClientCredentials

      public ClientCredentials(@Nonnull String clientId, @Nonnull String clientSecret)
      Specifies the OAuth 2.0 client.
      Parameters:
      clientId - - the ID of the OAuth 2.0 client requesting the token.
      clientSecret - - the secret of the OAuth 2.0 client requesting the token.
  • Method Details

    • getSecret

      public String getSecret()
      Description copied from interface: ClientIdentity
      Client secret of identity service instance.
      Specified by:
      getSecret in interface ClientIdentity
      Returns:
      client secret
    • getId

      public String getId()
      Description copied from interface: ClientIdentity
      Client id of identity service instance.
      Specified by:
      getId in interface ClientIdentity
      Returns:
      client identifier
    • isValid

      public boolean isValid()
      Description copied from interface: ClientIdentity
      Returns true, if the mandatory attributes in ClientIdentity class are filled for the specified authentication method i.e X.509 or client secret
      Specified by:
      isValid in interface ClientIdentity
      Returns:
      the boolean
    • equals

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

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

      public String toString()
      Overrides:
      toString in class Object