public interface Authentication extends Principal, ParameterSet
Authenticator.authenticate(AuthenticationToken).
Extends standard Principal interface, so the the principal name (for example the username) can be obtained
using Principal.getName().
Supports authorizations using Permission grants. All granted permissions should be provided by
getPermissions() method. If isRoot() returns true, this authentication will be treated
as root, i.e. with all permissions, and any granted permission will be ignored.
Authenticator| Modifier and Type | Interface and Description |
|---|---|
static interface |
Authentication.AuthenticationListener
Listener to handle authentication events.
|
static interface |
Authentication.AuthenticationNotifier
Supports
Authentication.AuthenticationListener registration. |
static interface |
Authentication.Builder
Builder to create
Authentication instances. |
| Modifier and Type | Method and Description |
|---|---|
static Authentication.Builder |
builder(String principalName)
Builder to create Authentication instance for given
principalName. |
Collection<Permission> |
getPermissions()
Set of
Permissions granted to principal with this Authentication |
Optional<String> |
getScheme()
Get the authentication scheme with which this authentication was produced.
|
boolean |
isRoot()
If this method returns
true, this Authentication is considered a root principal, for
which permission checking is always skipped, assuming that any permission is granted to this Authentication. |
equals, getName, hashCode, implies, toStringbuilder, empty, forEachParameter, getParameter, getParameter, getParameter, getParameter, getParameter, getParameterIf, getParameterIf, hasNotNullParameter, hasNotNullParameter, hasParameter, hasParameter, hasParameters, hasParameterValue, hasParameterValueOptional<String> getScheme()
Collection<Permission> getPermissions()
Permissions granted to principal with this Authenticationboolean isRoot()
true, this Authentication is considered a root principal, for
which permission checking is always skipped, assuming that any permission is granted to this Authentication.true if this Authentication is considered a root principalstatic Authentication.Builder builder(String principalName)
principalName.principalName - Principal name (not null)Copyright © 2019 The Holon Platform. All rights reserved.