public interface Security extends Feature
session as follows:
Security security = session.feature(Security.class);
| Modifier and Type | Interface and Description |
|---|---|
static interface |
Security.ChangePrincipalCallback
Deprecated.
since 6.7
Methods that use callbacks are deprecated and will be removed in a future release. Use CompletableFuture variant instead. |
static interface |
Security.ChangePrincipalContextCallback<C>
Deprecated.
since 6.7
Methods that use callbacks are deprecated and will be removed in a future release. Use CompletableFuture variant instead. |
| Modifier and Type | Method and Description |
|---|---|
CompletableFuture<Boolean> |
changePrincipal(String principal,
Credentials credentials)
Change the security principal associated with the session.
|
<C> void |
changePrincipal(String principal,
Credentials credentials,
C context,
Security.ChangePrincipalContextCallback<C> callback)
Deprecated.
since 6.7
Methods that use callbacks are deprecated and will be removed in a future release. Use CompletableFuture variant instead. |
void |
changePrincipal(String principal,
Credentials credentials,
Security.ChangePrincipalCallback callback)
Deprecated.
since 6.7
Methods that use callbacks are deprecated and will be removed in a future release. Use CompletableFuture variant instead. |
CompletableFuture<Set<GlobalPermission>> |
getGlobalPermissions()
Query the global permissions assigned to the calling session.
|
CompletableFuture<Set<PathPermission>> |
getPermissionsForPath(String path)
Query the path permissions assigned to the calling session on a given
path.
|
getSessionCompletableFuture<Boolean> changePrincipal(String principal, Credentials credentials)
principal - the new principal namecredentials - the credentials authenticating the new principal
If authentication succeeded and the session principal has been
changed, the CompletableFuture will complete successfully with a
TRUE result.
If authentication failed because the principal was
unknown or the credentials were invalid, the session's
principal has not changed and the CompletableFuture will complete
successfully with a FALSE result.
Otherwise, the CompletableFuture will complete exceptionally with
a CompletionException. Common reasons for failure, listed
by the exception reported as the
cause, include:
SessionClosedException – if the session is
closed.
@Deprecated void changePrincipal(String principal, Credentials credentials, Security.ChangePrincipalCallback callback)
Methods that use callbacks are deprecated and will be removed in a future release. Use CompletableFuture variant instead.
If authentication fails, the session's current principal will not be changed.
principal - the new principal namecredentials - the credentials authenticating the new principalcallback - called on success or failure@Deprecated <C> void changePrincipal(String principal, Credentials credentials, C context, Security.ChangePrincipalContextCallback<C> callback)
Methods that use callbacks are deprecated and will be removed in a future release. Use CompletableFuture variant instead.
If authentication fails, the session's current principal will not be changed.
C - the context object typeprincipal - the new principal namecredentials - credentials authenticating the new principalcontext - passed to the callbackcallback - called on success or failureCompletableFuture<Set<GlobalPermission>> getGlobalPermissions()
If the request was successful, the CompletableFuture will complete successfully with the session's global permissions.
CompletableFuture<Set<PathPermission>> getPermissionsForPath(String path)
path - the path to query for permissions
If the request was successful, the CompletableFuture will
complete successfully with the session's permissions for
path.
Copyright © 2023 DiffusionData Limited. All rights reserved.