public abstract class Secret extends Object implements AutoCloseable
Secrets are thread-safe and are immutable until destroyed (closed).
Modifier | Constructor and Description |
---|---|
protected |
Secret(SecretBuilder builder)
Constructs the secret using the given builder.
|
Modifier and Type | Method and Description |
---|---|
void |
close() |
boolean |
equals(Object that) |
Instant |
getExpiryTime()
The expiry time of this secret.
|
String |
getStableId()
A stable identifier for this particular secret that can be used to lookup the same secret in future.
|
int |
hashCode() |
boolean |
isExpired(Clock clock)
Indicates whether the secret has expired according to the given clock.
|
String |
toString() |
protected Secret(SecretBuilder builder)
builder
- the secret builder.public final Instant getExpiryTime()
SecretsProvider
.public final boolean isExpired(Clock clock)
clock
- the clock to use to determine the current time.SecretsProvider
.public final String getStableId()
public void close()
close
in interface AutoCloseable
Copyright © 2010-2018, ForgeRock All Rights Reserved.