public class DefaultAuthentication extends DefaultParameterSet implements Authentication
Authentication implementation.
This implementation relies on Principal name as authentication identity, so equals(Object) and
hashCode() methods are written according to this assumption.
| Modifier and Type | Class and Description |
|---|---|
static class |
DefaultAuthentication.AuthenticationBuilder
Default
Authentication.Builder implementation. |
DefaultParameterSet.AbstractBuilder<S extends ParameterSet,I extends DefaultParameterSet,B extends ParameterSet.Builder<S>>, DefaultParameterSet.DefaultBuilderAuthentication.AuthenticationListener, Authentication.AuthenticationNotifier, Authentication.Builder| Constructor and Description |
|---|
DefaultAuthentication(String name)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object obj) |
String |
getName() |
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.
|
int |
hashCode() |
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. |
void |
setRoot(boolean root)
Set whether this Authentication is considered a
root principal, for which permission checking is
always skipped, assuming that any permission is granted to this Authentication. |
String |
toString() |
addParameter, forEachParameter, getParameter, getParameter, getParameterIf, hasNotNullParameter, hasParameter, hasParameters, hasParameterValue, removeParameterbuilderbuilder, empty, forEachParameter, getParameter, getParameter, getParameter, getParameter, getParameter, getParameterIf, getParameterIf, hasNotNullParameter, hasNotNullParameter, hasParameter, hasParameter, hasParameters, hasParameterValue, hasParameterValuepublic DefaultAuthentication(String name)
name - Principal name (for example, the username), not nullpublic Optional<String> getScheme()
AuthenticationgetScheme in interface Authenticationpublic boolean isRoot()
Authenticationtrue, this Authentication is considered a root principal, for
which permission checking is always skipped, assuming that any permission is granted to this Authentication.isRoot in interface Authenticationtrue if this Authentication is considered a root principalpublic void setRoot(boolean root)
root principal, for which permission checking is
always skipped, assuming that any permission is granted to this Authentication.root - true to set this Authentication as root principalpublic Collection<Permission> getPermissions()
AuthenticationPermissions granted to principal with this AuthenticationgetPermissions in interface Authenticationpublic String toString()
toString in interface PrincipaltoString in class DefaultParameterSetpublic int hashCode()
Copyright © 2019 The Holon Platform. All rights reserved.