public interface Credentials extends Serializable
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Credentials.Builder
Builder to create
Credentials instances. |
static interface |
Credentials.Encoder
Builder to encode credentials using hash for secure storing.
|
| Modifier and Type | Method and Description |
|---|---|
static Credentials.Builder |
builder()
Builder to create Credentials instance
|
static Credentials.Encoder |
encoder()
Credentials encoder
|
Date |
getExpireDate()
Credential expire date
|
String |
getHashAlgorithm()
Get hash algorithm used to encode secret.
|
int |
getHashIterations()
Get hash iterations performed for secret encoding
|
byte[] |
getSalt()
Get salt data used to hash secret
|
byte[] |
getSecret()
Get secret data (e.g.
|
boolean |
isBase64Encoded()
Whether secret is encoded using Base64.
|
boolean |
isHexEncoded()
Whether secret is encoded using hexademical representation
|
byte[] getSecret()
String getHashAlgorithm()
null, means secret is not hashed and getSalt()
or getHashIterations() must be ignored.byte[] getSalt()
int getHashIterations()
boolean isBase64Encoded()
true and hash algorithm is specified, any salt data will
be considered Base64 encoded too.true if secret is encoded using Base64boolean isHexEncoded()
true if secret is hex encodedDate getExpireDate()
null if credential never expiresstatic Credentials.Builder builder()
static Credentials.Encoder encoder()
Copyright © 2019 The Holon Platform. All rights reserved.