Package com.sap.cloud.security.config
Class ClientCertificate
- java.lang.Object
-
- com.sap.cloud.security.config.ClientCertificate
-
- All Implemented Interfaces:
ClientIdentity
public class ClientCertificate extends Object implements ClientIdentity
-
-
Constructor Summary
Constructors Constructor Description ClientCertificate(String certificate, String key, String clientId)
Represents certificate based client identity.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
equals(Object o)
String
getCertificate()
PEM encoded certificate chain.String
getId()
Client id of identity service instance.String
getKey()
PEM encoded private key the certificate is signed with.int
hashCode()
boolean
isValid()
Returns true, if the mandatory attributes in ClientIdentity class are filled for the specified authentication method i.e X.509 or client secret-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface com.sap.cloud.security.config.ClientIdentity
getSecret, isCertificateBased
-
-
-
-
Constructor Detail
-
ClientCertificate
public ClientCertificate(@Nullable String certificate, @Nullable String key, @Nullable String clientId)
Represents certificate based client identity.- Parameters:
certificate
- PEM encoded X.509 certificate of the OAuth 2.0 clientkey
- PEM encoded X.509 private key of the OAuth 2.0 clientclientId
- ID of the OAuth 2.0 client requesting the token.
-
-
Method Detail
-
getCertificate
public String getCertificate()
Description copied from interface:ClientIdentity
PEM encoded certificate chain.- Specified by:
getCertificate
in interfaceClientIdentity
- Returns:
- certificate chain
-
getKey
public String getKey()
Description copied from interface:ClientIdentity
PEM encoded private key the certificate is signed with.- Specified by:
getKey
in interfaceClientIdentity
- Returns:
- private key
-
getId
public String getId()
Description copied from interface:ClientIdentity
Client id of identity service instance.- Specified by:
getId
in interfaceClientIdentity
- 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 interfaceClientIdentity
- Returns:
- the boolean
-
-