public class DefaultAuthenticatedIdentity extends Object implements AuthenticatedIdentity
This implementation is an immutable structure, with a facility to store it in TLS. It's the responsibility of the context, e.g. the HTTP request handler, to remove the identity from TLS at the end of the context (e.g. end of the HTTP request), or at any other appropriate time (e.g. when logging out mid-request).
Constructor and Description |
---|
DefaultAuthenticatedIdentity(Principal callerPrincipal,
Set<String> groups) |
Modifier and Type | Method and Description |
---|---|
static void |
clear() |
Principal |
getCallerPrincipal() |
static AuthenticatedIdentity |
getCurrentIdentity() |
static Subject |
getCurrentSubject() |
Set<String> |
getGroups() |
static void |
setCurrentIdentity(AuthenticatedIdentity identity) |
static void |
setCurrentIdentity(Principal callerPrincipal,
Set<String> groups) |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getName
public static void setCurrentIdentity(Principal callerPrincipal, Set<String> groups)
public static void setCurrentIdentity(AuthenticatedIdentity identity)
public static Subject getCurrentSubject()
public static AuthenticatedIdentity getCurrentIdentity()
public static void clear()
public Principal getCallerPrincipal()
getCallerPrincipal
in interface AuthenticatedIdentity
public Set<String> getGroups()
getGroups
in interface AuthenticatedIdentity
Copyright © 2020. All rights reserved.