Package net.shibboleth.idp.admin.impl

# Class UnlockPrivateKeys

java.lang.Object
net.shibboleth.shared.component.AbstractInitializableComponent
org.opensaml.profile.action.AbstractProfileAction
org.opensaml.profile.action.AbstractConditionalProfileAction
net.shibboleth.idp.profile.AbstractProfileAction
net.shibboleth.idp.admin.impl.UnlockPrivateKeys

All Implemented Interfaces:
  `Component`, `DestructableComponent`, `InitializableComponent`, `ProfileAction`, `Aware`, `MessageSource`, `MessageSourceAware`, `Action`

public class UnlockPrivateKeys extends AbstractProfileAction
Action that creates private key objects and injects them into existing `MutableCredential` objects.

An error event will be signaled after the first unsuccessful unlock operation.

Since:
  3.4.0
Event:
  `EventIds.PROCEED_EVENT_ID`, `EventIds.INVALID_PROFILE_CTX`, `EventIds.INVALID_MESSAGE`

## Field Summary

Fields
Modifier and Type
Field
Description
`private Collection<MutableCredential>`
`credentials`
Credentials to operate on.
`static final String`
`KEY_PASSWORD_PARAM_NAME`
Name of private key password parameter.
`private Collection<Resource>`
`keyResources`
Keys to load.
`private org.slf4j.Logger`
`log`
Class logger.

## Constructor Summary

Constructors
Constructor
Description
`UnlockPrivateKeys()`
Constructor.

## Method Summary

Modifier and Type
Method
Description
`protected void`
`doExecute(ProfileRequestContext profileRequestContext)`
`protected void`
`doInitialize()`
`protected boolean`
`doPreExecute(ProfileRequestContext profileRequestContext)`
`void`
`setCredentials(Collection<MutableCredential> creds)`
Set the credentials to load keys into.
`void`
`setKeyResources(Collection<Resource> keys)`
Set the key resources to load.

### Methods inherited from class net.shibboleth.idp.profile.AbstractProfileAction

`doExecute, execute, getBean, getBean, getMessage, getMessage, getMessage, getParameter, getParameter, getProfileContextLookupStrategy, getRequestContext, getResult, setMessageSource, setProfileContextLookupStrategy`

### Methods inherited from class org.opensaml.profile.action.AbstractConditionalProfileAction

`getActivationCondition, setActivationCondition`

### Methods inherited from class org.opensaml.profile.action.AbstractProfileAction

`doPostExecute, doPostExecute, ensureHttpServletRequest, ensureHttpServletResponse, execute, getHttpServletRequest, getHttpServletRequestSupplier, getHttpServletResponse, getHttpServletResponseSupplier, getLogPrefix, isPreExecuteCalled, setHttpServletRequestSupplier, setHttpServletResponseSupplier`

### Methods inherited from class net.shibboleth.shared.component.AbstractInitializableComponent

`checkComponentActive, checkSetterPreconditions, destroy, doDestroy, ifDestroyedThrowDestroyedComponentException, ifInitializedThrowUnmodifiabledComponentException, ifNotInitializedThrowUninitializedComponentException, initialize, isDestroyed, isInitialized`

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

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

### Methods inherited from interface net.shibboleth.shared.component.InitializableComponent

`initialize, isInitialized`

## Field Details

### KEY_PASSWORD_PARAM_NAME

@Nonnull @NotEmpty public static final String KEY_PASSWORD_PARAM_NAME
Name of private key password parameter.

See Also:
  - Constant Field Values

### log

@Nonnull private org.slf4j.Logger log
Class logger.

### credentials

@Nonnull private Collection<MutableCredential> credentials
Credentials to operate on.

### keyResources

@Nonnull private Collection<Resource> keyResources
Keys to load.

## Constructor Details

### UnlockPrivateKeys

public UnlockPrivateKeys()
Constructor.

## Method Details

### setCredentials

public void setCredentials(@Nullable Collection<MutableCredential> creds)
Set the credentials to load keys into.

Parameters:
  `creds` - credentials to load keys into

### setKeyResources

public void setKeyResources(@Nullable Collection<Resource> keys)
Set the key resources to load.

Parameters:
  `keys` - key resources to load

### doInitialize

protected void doInitialize() throws ComponentInitializationException

Overrides:
  `doInitialize` in class `AbstractInitializableComponent`
Throws:
  `ComponentInitializationException`

### doPreExecute

protected boolean doPreExecute(@Nonnull ProfileRequestContext profileRequestContext)

Overrides:
  `doPreExecute` in class `AbstractConditionalProfileAction`

### doExecute

protected void doExecute(@Nonnull ProfileRequestContext profileRequestContext)

Overrides:
  `doExecute` in class `AbstractProfileAction`