public interface Account extends CredentialsContainer, Serializable
Account.AccountProvider| Modifier and Type | Interface and Description |
|---|---|
static interface |
Account.AccountProvider
Provider which can be used to load
Account data. |
static interface |
Account.Builder
Builder to create
Account instances. |
CredentialsContainer.CredentialsMatcher| Modifier and Type | Method and Description |
|---|---|
static AuthenticationToken |
accountCredentialsToken(String accountId,
byte[] secret)
Create a new
AccountCredentialsToken with given account id and secret. |
static AuthenticationToken |
accountCredentialsToken(String accountId,
String secret)
Create a new
AccountCredentialsToken with given account id and secret. |
static Authenticator<AccountCredentialsToken> |
authenticator(Account.AccountProvider accountProvider)
Build an
Authenticator using Account.AccountProvider to load Account data and accepting
AccountCredentialsToken as credentials. |
static Authenticator<AccountCredentialsToken> |
authenticator(Account.AccountProvider accountProvider,
CredentialsContainer.CredentialsMatcher credentialsMatcher)
Build an
Authenticator using Account.AccountProvider to load Account data and accepting
AccountCredentialsToken as credentials. |
static Account.Builder |
builder(String accountId)
Builder to create
Account instances |
Object |
getCredentials()
Account stored credentials data
|
Map<String,Object> |
getDetails()
Optional account details (e.g.
|
String |
getId()
Account id (required).
|
Collection<Permission> |
getPermissions()
Optional permissions granted to account
|
boolean |
isEnabled()
Indicates whether this account is enabled
|
boolean |
isExpired()
Indicates whether this account has expired
|
boolean |
isLocked()
Indicates whether this account is locked
|
boolean |
isRoot()
Whether account is
root, i.e. |
defaultMatcherString getId()
username if account represents a user.Object getCredentials()
getCredentials in interface CredentialsContainerboolean isRoot()
root, i.e. has any permission. If this method returns true,
getPermissions() is ignored.true if this account is a root accountMap<String,Object> getDetails()
Collection<Permission> getPermissions()
boolean isEnabled()
true if enabledboolean isLocked()
true if lockedboolean isExpired()
true if expiredstatic Account.Builder builder(String accountId)
Account instancesaccountId - Account id (not null)static Authenticator<AccountCredentialsToken> authenticator(Account.AccountProvider accountProvider)
Authenticator using Account.AccountProvider to load Account data and accepting
AccountCredentialsToken as credentials.
Default CredentialsMatcher is used for AuthenticationToken credentials validation.
accountProvider - Account.AccountProvider to load Account datastatic Authenticator<AccountCredentialsToken> authenticator(Account.AccountProvider accountProvider, CredentialsContainer.CredentialsMatcher credentialsMatcher)
Authenticator using Account.AccountProvider to load Account data and accepting
AccountCredentialsToken as credentials.accountProvider - Account.AccountProvider to load Account datacredentialsMatcher - CredentialsMatcher to use for AuthenticationToken credentials validationstatic AuthenticationToken accountCredentialsToken(String accountId, String secret)
AccountCredentialsToken with given account id and secret.accountId - Account idsecret - SecretAuthenticationToken with given credentialsstatic AuthenticationToken accountCredentialsToken(String accountId, byte[] secret)
AccountCredentialsToken with given account id and secret.accountId - Account idsecret - SecretAuthenticationToken with given credentialsCopyright © 2019 The Holon Platform. All rights reserved.