A OneShotSecret
is a secret that can be used only once.
After the first use, the secret is destroyed.
Type parameters
- T
-
type of the secret
Attributes
- Companion
- object
- Graph
-
- Supertypes
-
trait AutoCloseableclass Objecttrait Matchableclass Any
Members list
Value members
Inherited methods
Alias for destroy
Alias for destroy
Attributes
- Definition Classes
-
SecretApi -> AutoCloseable
- Inherited from:
- SecretApi (hidden)
Destroy the secret value by filling the obfuscated value with '\0'.
Destroy the secret value by filling the obfuscated value with '\0'.
This method is idempotent.
Once the secret is destroyed it can't be used anymore. If you try to use it using use
, useAndDestroy
, evalUse
, evalUseAndDestroy
and other methods, it will raise a NoLongerValidSecret
exception.
Attributes
- Inherited from:
- SecretApi (hidden)
Attributes
- Returns
-
the location where the secret was destroyed if the collection is enabled.
- Inherited from:
- SecretApi (hidden)
Always returns false
to prevents leaking information.
Always returns false
to prevents leaking information.
Use isHashedEquals or isValueEquals
Attributes
- Definition Classes
-
SecretApi -> Any
- Inherited from:
- SecretApi (hidden)
Alias for useAndDestroy
with Either[Throwable, *]
Alias for useAndDestroy
with Either[Throwable, *]
Attributes
- Inherited from:
- SecretApi (hidden)
Apply f
with the de-obfuscated value and then destroy the secret value by invoking destroy
method.
Apply f
with the de-obfuscated value and then destroy the secret value by invoking destroy
method.
Once the secret is destroyed it can't be used anymore. If you try to use it using use
, useAndDestroy
, evalUse
, evalUseAndDestroy
and other methods, it will raise a SecretDestroyed
exception.
Attributes
- Inherited from:
- SecretApi (hidden)
flat map the value using the specified function and then destroy this.
flat map the value using the specified function and then destroy this.
If the secret were destroyed it will raise a SecretDestroyed
when you try to use the new secret.
Attributes
- Inherited from:
- SecretApi (hidden)
Attributes
- Returns
-
a hashed representation of the secret value
- Inherited from:
- SecretApi (hidden)
Check if the secret is destroyed
Check if the secret is destroyed
Attributes
- Returns
-
true
if the secret is destroyed,false
otherwise - Inherited from:
- SecretApi (hidden)
Safely compare the hashed value of this secret with the provided Secret
.
Safely compare the hashed value of this secret with the provided Secret
.
Attributes
- Inherited from:
- SecretApi (hidden)
map the value using the specified function and then destroy this.
map the value using the specified function and then destroy this.
If the secret were destroyed it will raise a SecretDestroyed
when you try to use the new secret.
Attributes
- Inherited from:
- SecretApi (hidden)
Apply f
with the de-obfuscated value and then destroy the secret value by invoking destroy
method.
Apply f
with the de-obfuscated value and then destroy the secret value by invoking destroy
method.
Once the secret is destroyed it can't be used anymore. If you try to use it using use
, useAndDestroy
, evalUse
, evalUseAndDestroy
and other methods, it will raise a SecretDestroyed
exception.
Attributes
- Inherited from:
- SecretApi (hidden)
Inherited fields
Attributes
- Returns
-
always returns a static place holder string "** SECRET **" to avoid leaking information
- Inherited from:
- SecretApi (hidden)