ImportKeyOptions Class

public class ImportKeyOptions
extends KeyProperties

Represents the configurable options to import a key.

Constructor Summary

Constructor Description
ImportKeyOptions(String name, JsonWebKey key)

Creates instance of ImportKeyOptions.

Method Summary

Modifier and Type Method and Description
JsonWebKey getKey()

Get the key material of the key being imported.

Boolean isHardwareProtected()

Get the HSM value of the key being imported.

ImportKeyOptions setEnabled(Boolean enabled)

Set a value that indicates if the key is enabled.

ImportKeyOptions setExpiresOn(OffsetDateTime expiresOn)

Set the key expiration time in UTC.

ImportKeyOptions setHardwareProtected(Boolean hardwareProtected)

Set whether the key being imported is of HSM type or not.

ImportKeyOptions setNotBefore(OffsetDateTime notBefore)

Set the key's notBefore time in UTC.

Methods inherited from KeyProperties

Methods inherited from java.lang.Object

Constructor Details

ImportKeyOptions

public ImportKeyOptions(String name, JsonWebKey key)

Creates instance of ImportKeyOptions.

Parameters:

name - The name of the key.
key - The key material to import.

Method Details

getKey

public JsonWebKey getKey()

Get the key material of the key being imported.

Returns:

The key material.

isHardwareProtected

public Boolean isHardwareProtected()

Get the HSM value of the key being imported.

Returns:

The HSM value.

setEnabled

public ImportKeyOptions setEnabled(Boolean enabled)

Set a value that indicates if the key is enabled.

Overrides:

ImportKeyOptions.setEnabled(Boolean enabled)

Parameters:

enabled - The enabled value to set.

Returns:

The updated ImportKeyOptions object.

setExpiresOn

public ImportKeyOptions setExpiresOn(OffsetDateTime expiresOn)

Set the key expiration time in UTC.

Overrides:

ImportKeyOptions.setExpiresOn(OffsetDateTime expiresOn)

Parameters:

expiresOn - The key expiration time in UTC.

Returns:

The updated ImportKeyOptions object.

setHardwareProtected

public ImportKeyOptions setHardwareProtected(Boolean hardwareProtected)

Set whether the key being imported is of HSM type or not.

Parameters:

hardwareProtected - The HSM value to set.

Returns:

The ImportKeyOptions object itself.

setNotBefore

public ImportKeyOptions setNotBefore(OffsetDateTime notBefore)

Set the key's notBefore time in UTC.

Overrides:

ImportKeyOptions.setNotBefore(OffsetDateTime notBefore)

Parameters:

notBefore - The key's notBefore time in UTC.

Returns:

The updated ImportKeyOptions object.

Applies to