Class ClientCertificate
java.lang.Object
com.sap.cloud.security.config.ClientCertificate
- All Implemented Interfaces:
ClientIdentity
-
Constructor Summary
ConstructorsConstructorDescriptionClientCertificate(String certificate, String key, String clientId) Represents certificate based client identity.ClientCertificate(Certificate[] certificateChain, PrivateKey privateKey, String clientId) Represents certificate based client identity. -
Method Summary
Modifier and TypeMethodDescriptionbooleanPEM encoded certificate chain.getId()Client id of identity service instance.getKey()PEM encoded private key the certificate is signed with.inthashCode()booleanisValid()Returns true, if the mandatory attributes in ClientIdentity class are filled for the specified authentication method i.e X.509 or client secretMethods inherited from class Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface ClientIdentity
getSecret, isCertificateBased
-
Constructor Details
-
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.
-
ClientCertificate
public ClientCertificate(@Nullable Certificate[] certificateChain, @Nullable PrivateKey privateKey, @Nullable String clientId) Represents certificate based client identity.- Parameters:
certificateChain- Certificate chain of the OAuth 2.0 clientprivateKey- Private key of the OAuth 2.0 clientclientId- ID of the OAuth 2.0 client requesting the token.
-
-
Method Details
-
getCertificateChain
- Specified by:
getCertificateChainin interfaceClientIdentity- Returns:
- Certificate chain array
-
getPrivateKey
- Specified by:
getPrivateKeyin interfaceClientIdentity- Returns:
- Private key
-
getCertificate
Description copied from interface:ClientIdentityPEM encoded certificate chain.- Specified by:
getCertificatein interfaceClientIdentity- Returns:
- certificate chain
-
getKey
Description copied from interface:ClientIdentityPEM encoded private key the certificate is signed with.- Specified by:
getKeyin interfaceClientIdentity- Returns:
- private key
-
getId
Description copied from interface:ClientIdentityClient id of identity service instance.- Specified by:
getIdin interfaceClientIdentity- Returns:
- client identifier
-
isValid
public boolean isValid()Description copied from interface:ClientIdentityReturns true, if the mandatory attributes in ClientIdentity class are filled for the specified authentication method i.e X.509 or client secret- Specified by:
isValidin interfaceClientIdentity- Returns:
- the boolean
-
equals
-
hashCode
-