Package org.apache.sling.auth.saml2.sp

## Class KeyPairCredentials

- java.lang.Object
- - org.apache.sling.auth.saml2.sp.JksCredentials
  - - org.apache.sling.auth.saml2.sp.KeyPairCredentials

    public class KeyPairCredentials
    extends JksCredentials

To sign and encrypt outgoing SAML messages a KeyPair credential is required

### Method Summary

All Methods Static Methods Concrete Methods
`static org.opensaml.security.x509.BasicX509Credential` `getCredential​(String jksPath, char[] jksPassword, String certAlias, char[] keysPassword)` Returns a BasicX509Credential representing the key pair of the SAML Service Provider This credential is used to encrypt and cryptographically sign SAML messages sent to the Identity Provider.

### Methods inherited from class org.apache.sling.auth.saml2.sp.JksCredentials

`getKeyStore`

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Method Detail

#### getCredential

    public static org.opensaml.security.x509.BasicX509Credential getCredential​(String jksPath,
                                                                               char[] jksPassword,
                                                                               String certAlias,
                                                                               char[] keysPassword)

Returns a BasicX509Credential representing the key pair of the SAML Service Provider This credential is used to encrypt and cryptographically sign SAML messages sent to the Identity Provider.

Parameters:
  `jksPath` - path on the file system, e.g. ./sling/keys/example.jks
  `jksPassword` - truststore password as char array
  `certAlias` - alias given to the keystore associated to this Service Provider
  `keysPassword` - password for the keystore associated to this Service Provider
Returns:
  returns the SP X509 Credential