@ApplicationScoped @Alternative public class DefaultSecurityContext extends AbstractSecurityContext
Modifier and Type | Field and Description |
---|---|
static ThreadLocal<javax.servlet.http.HttpServletRequest> |
servletRequest |
Constructor and Description |
---|
DefaultSecurityContext()
Constructor.
|
Modifier and Type | Method and Description |
---|---|
protected static void |
clearPermissions()
Called to clear the current thread local permissions bean.
|
protected static void |
clearServletRequest()
Called to clear the context http servlet request.
|
String |
getCurrentUser() |
String |
getEmail() |
String |
getFullName() |
String |
getRequestHeader(String headerName)
Gets a request header from the current in-scope request.
|
boolean |
isAdmin()
Returns true if the current user is an administrator.
|
protected static void |
setServletRequest(javax.servlet.http.HttpServletRequest request)
Called to set the current context http servlet request.
|
getIdmStorage, getPermittedOrganizations, hasPermission, setIdmStorage
public static final ThreadLocal<javax.servlet.http.HttpServletRequest> servletRequest
public String getRequestHeader(String headerName)
ISecurityContext
headerName
- the header nameISecurityContext.getRequestHeader(java.lang.String)
public String getCurrentUser()
ISecurityContext.getCurrentUser()
public String getEmail()
ISecurityContext.getEmail()
public String getFullName()
ISecurityContext.getFullName()
public boolean isAdmin()
ISecurityContext
ISecurityContext.isAdmin()
protected static void setServletRequest(javax.servlet.http.HttpServletRequest request)
request
- protected static void clearPermissions()
protected static void clearServletRequest()
Copyright © 2015 JBoss, a division of Red Hat. All rights reserved.