Package net.shibboleth.idp.authn.impl

# Class KeystoreResourceCredentialConfig

java.lang.Object
net.shibboleth.idp.authn.impl.KeystoreResourceCredentialConfig

All Implemented Interfaces:
  `CredentialConfig`

public class KeystoreResourceCredentialConfig extends Object implements CredentialConfig
Implementation of `CredentialConfig` that loads keystore and truststore data using a `Resource`.

## Field Summary

Fields
Modifier and Type
Field
Description
`private Resource`
`keystore`
Keystore resource.
`private String[]`
`keystoreAliases`
Keystore aliases to use.
`private String`
`keystorePassword`
Password for keystore.
`private final KeyStoreCredentialReader`
`keyStoreReader`
Handles loading keystores.
`private String`
`keystoreType`
Type of keystore.
`private Resource`
`truststore`
Truststore resource.
`private String[]`
`truststoreAliases`
Truststore aliases to use.
`private String`
`truststorePassword`
Password for truststore.
`private String`
`truststoreType`
Type of truststore.

## Constructor Summary

Constructors
Constructor
Description
`KeystoreResourceCredentialConfig()`

## Method Summary

Modifier and Type
Method
Description
`SSLContextInitializer`
`createSSLContextInitializer()`
`void`
`setKeystore(Resource resource)`
Set the keystore resource.
`void`
`setKeystoreAliases(String[] aliases)`
Set the keystore aliases.
`void`
`setKeystorePassword(String password)`
Set the keystore password.
`void`
`setKeystoreType(String type)`
Set the keystore type.
`void`
`setTruststore(Resource resource)`
Set the truststore resource.
`void`
`setTruststoreAliases(String[] aliases)`
Set the truststore aliases.
`void`
`setTruststorePassword(String password)`
Set the truststore password.
`void`
`setTruststoreType(String type)`
Set the truststore type.

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

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

## Field Details

### keyStoreReader

@Nonnull private final KeyStoreCredentialReader keyStoreReader
Handles loading keystores.

### truststore

@Nullable private Resource truststore
Truststore resource.

### truststorePassword

@Nullable private String truststorePassword
Password for truststore.

### truststoreType

@Nullable private String truststoreType
Type of truststore.

### truststoreAliases

@Nullable private String[] truststoreAliases
Truststore aliases to use.

### keystore

@Nullable private Resource keystore
Keystore resource.

### keystorePassword

@Nullable private String keystorePassword
Password for keystore.

### keystoreType

@Nullable private String keystoreType
Type of keystore.

### keystoreAliases

@Nullable private String[] keystoreAliases
Keystore aliases to use.

## Constructor Details

### KeystoreResourceCredentialConfig

public KeystoreResourceCredentialConfig()

## Method Details

### setTruststore

public void setTruststore(@Nonnull @NotEmpty Resource resource)
Set the truststore resource.

Parameters:
  `resource` - the truststore resource

### setTruststorePassword

public void setTruststorePassword(@Nonnull @NotEmpty String password)
Set the truststore password.

Parameters:
  `password` - the truststore password

### setTruststoreType

public void setTruststoreType(@Nonnull @NotEmpty String type)
Set the truststore type.

Parameters:
  `type` - the truststore type

### setTruststoreAliases

public void setTruststoreAliases(@Nonnull @NotEmpty String[] aliases)
Set the truststore aliases.

Parameters:
  `aliases` - the truststore aliases

### setKeystore

public void setKeystore(@Nonnull @NotEmpty Resource resource)
Set the keystore resource.

Parameters:
  `resource` - the keystore resource

### setKeystorePassword

public void setKeystorePassword(@Nonnull @NotEmpty String password)
Set the keystore password.

Parameters:
  `password` - the keystore password

### setKeystoreType

public void setKeystoreType(@Nonnull @NotEmpty String type)
Set the keystore type.

Parameters:
  `type` - the keystore type

### setKeystoreAliases

public void setKeystoreAliases(@Nonnull @NotEmpty String[] aliases)
Set the keystore aliases.

Parameters:
  `aliases` - the keystore aliases

### createSSLContextInitializer

public SSLContextInitializer createSSLContextInitializer() throws GeneralSecurityException

Specified by:
  `createSSLContextInitializer` in interface `CredentialConfig`
Throws:
  `GeneralSecurityException`