Package io.quarkus.vault
Class VaultTOTPSecretEngine
java.lang.Object
io.quarkus.vault.VaultTOTPSecretEngine
This service provides access to the TOTP secret engine.
- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptioncreateKey(String name, CreateKeyParameters createKeyParameters) Creates or updates a key definition.voidDeletes the key definition.generateCode(String name) Generates a new time-based one-time use password based on the named key.listKeys()Returns a list of available keys.Queries the key definition.booleanvalidateCode(String name, String code) Validates a time-based one-time use password generated from the named key.
-
Constructor Details
-
VaultTOTPSecretEngine
-
-
Method Details
-
createKey
Creates or updates a key definition.- Parameters:
name- of the key.createKeyParameters- required to create or update a key.- Returns:
- Barcode and/or URL of the created OTP key.
-
readKey
Queries the key definition.- Parameters:
name- of the key.- Returns:
- The key configuration.
-
listKeys
Returns a list of available keys. Only the key names are returned, not any values.- Returns:
- List of available keys.
-
deleteKey
Deletes the key definition.- Parameters:
name- of the key.
-
generateCode
Generates a new time-based one-time use password based on the named key.- Parameters:
name- of the key.- Returns:
- The Code.
-
validateCode
Validates a time-based one-time use password generated from the named key.- Parameters:
name- of the key.code- to validate.- Returns:
- True if valid, false otherwise.
-