public static class DefaultAuthentication.AuthenticationBuilder extends Object implements Authentication.Builder
Authentication.Builder implementation.| Constructor and Description |
|---|
AuthenticationBuilder(String principalName)
Constructor
|
| Modifier and Type | Method and Description |
|---|---|
Authentication |
build()
Create Authentication instance
|
Authentication.Builder |
root(boolean root)
Set whether authentication is considered a
root principal, for which permission checking is
always skipped, assuming that any permission is granted. |
Authentication.Builder |
scheme(String scheme)
Set the authentication scheme with which this authentication was produced.
|
<T> Authentication.Builder |
withParameter(ConfigProperty<T> property,
T value)
Add an authentication parameter using a
ConfigProperty an ConfigProperty.getKey() as
parameter name |
Authentication.Builder |
withParameter(String name,
Object value)
Add an authentication parameter.
|
Authentication.Builder |
withPermission(Permission permission)
Add a permission granted to Authentication
|
Authentication.Builder |
withPermission(String permission)
Add a permission granted to Authentication using String representation.
|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitparameter, parameter, permission, permissionpublic AuthenticationBuilder(String principalName)
principalName - Principal name (not null)public Authentication.Builder scheme(String scheme)
Authentication.Builderscheme in interface Authentication.Builderscheme - Authentication scheme namepublic Authentication.Builder root(boolean root)
Authentication.Builderroot principal, for which permission checking is
always skipped, assuming that any permission is granted.root in interface Authentication.Builderroot - true to set authentication as root principalpublic Authentication.Builder withParameter(String name, Object value)
Authentication.BuilderwithParameter in interface Authentication.Buildername - Parameter name (not null)value - Parameter valuepublic <T> Authentication.Builder withParameter(ConfigProperty<T> property, T value)
Authentication.BuilderConfigProperty an ConfigProperty.getKey() as
parameter namewithParameter in interface Authentication.BuilderT - Property typeproperty - ConfigProperty to obtain parameter name (not null)value - Parameter valuepublic Authentication.Builder withPermission(Permission permission)
Authentication.BuilderwithPermission in interface Authentication.Builderpermission - Permission to add (not null)public Authentication.Builder withPermission(String permission)
Authentication.BuilderwithPermission in interface Authentication.Builderpermission - Permission string to add (not null)public Authentication build()
Authentication.Builderbuild in interface Authentication.BuilderCopyright © 2019 The Holon Platform. All rights reserved.