protected static class ServletProvider.ServletSecurityContext extends Object implements SecurityContext
Modifier | Constructor and Description |
---|---|
protected |
ServletProvider.ServletSecurityContext(HttpServletRequest request) |
Modifier and Type | Method and Description |
---|---|
String |
getUserName()
Returns the authenticated user's name
|
boolean |
hasRole(String roleName)
Returns whether the authenticated user has the given role.
|
boolean |
isAnonymous()
Return whether this security context is an anonymous context.
|
void |
logout()
Logs the user out of the authentication mechanism.
|
protected ServletProvider.ServletSecurityContext(HttpServletRequest request)
public boolean isAnonymous()
SecurityContext
isAnonymous
in interface SecurityContext
public final String getUserName()
SecurityContext
getUserName
in interface SecurityContext
public final boolean hasRole(String roleName)
SecurityContext
hasRole
in interface SecurityContext
roleName
- the name of the role to checkpublic void logout()
SecurityContext
For some authentication mechanisms, this will be implemented as a no-op.
logout
in interface SecurityContext
Copyright © 2008-2014 JBoss, a division of Red Hat. All Rights Reserved.