public interface Security extends Feature
session
as follows:
Security security = session.feature(Security.class);
Modifier and Type | Interface and Description |
---|---|
static interface |
Security.ChangePrincipalCallback
The callback interface for
changePrincipal(String, Credentials, ChangePrincipalCallback)
. |
static interface |
Security.ChangePrincipalContextCallback<C>
The callback interface for
changePrincipal(String, Credentials, Object, ChangePrincipalContextCallback)
. |
Modifier and Type | Method and Description |
---|---|
<C> void |
changePrincipal(String principal,
Credentials credentials,
C context,
Security.ChangePrincipalContextCallback<C> callback)
Change the security principal associated with the current session.
|
void |
changePrincipal(String principal,
Credentials credentials,
Security.ChangePrincipalCallback callback)
Change the security principal associated with the current session.
|
getSession
void changePrincipal(String principal, Credentials credentials, Security.ChangePrincipalCallback callback) throws IllegalArgumentException, SessionClosedException
If authentication fails, the current principal will remain valid.
principal
- the new principal namecredentials
- the credentials authenticating the new principalcallback
- called on success or failureIllegalArgumentException
- if principal
,
credentials
, or callback
is nullSessionClosedException
- if the session is closed<C> void changePrincipal(String principal, Credentials credentials, C context, Security.ChangePrincipalContextCallback<C> callback) throws IllegalArgumentException, SessionClosedException
If authentication fails, the current principal will remain valid.
C
- the context object typeprincipal
- the new principal namecredentials
- credentials authenticating the new principalcontext
- passed to the callbackcallback
- called on success or failureIllegalArgumentException
- if principal
,
credentials
, or callback
is nullSessionClosedException
- if the session is closedCopyright © 2016 Push Technology Ltd. All Rights Reserved.