Interface VaultTOTPSecretReactiveEngine

  • All Known Implementing Classes:
    VaultTOTPManager

    public interface VaultTOTPSecretReactiveEngine
    This service provides access to the TOTP secret engine.
    See Also:
    TOTP Secrets Engine
    • Method Detail

      • createKey

        io.smallrye.mutiny.Uni<Optional<KeyDefinition>> createKey​(String name,
                                                                  CreateKeyParameters createKeyParameters)
        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

        io.smallrye.mutiny.Uni<KeyConfiguration> readKey​(String name)
        Queries the key definition.
        Parameters:
        name - of the key.
        Returns:
        The key configuration.
      • listKeys

        io.smallrye.mutiny.Uni<List<String>> listKeys()
        Returns a list of available keys. Only the key names are returned, not any values.
        Returns:
        List of available keys.
      • deleteKey

        io.smallrye.mutiny.Uni<Void> deleteKey​(String name)
        Deletes the key definition.
        Parameters:
        name - of the key.
      • generateCode

        io.smallrye.mutiny.Uni<String> generateCode​(String name)
        Generates a new time-based one-time use password based on the named key.
        Parameters:
        name - of the key.
        Returns:
        The Code.
      • validateCode

        io.smallrye.mutiny.Uni<Boolean> validateCode​(String name,
                                                     String code)
        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.