public class SecurityContextAdapter extends Object implements SecurityContext
Constructor and Description |
---|
SecurityContextAdapter(javax.ws.rs.core.SecurityContext jaxRsContext) |
Modifier and Type | Method and Description |
---|---|
Principal |
getUserPrincipal()
Returns a java.security.Principal object containing the name of the current authenticated user.
|
boolean |
isUserInRole(String roleName)
Returns a boolean indicating whether the authenticated user is included in the specified logical "role".
|
public SecurityContextAdapter(javax.ws.rs.core.SecurityContext jaxRsContext)
public Principal getUserPrincipal()
SecurityContext
getUserPrincipal
in interface SecurityContext
public boolean isUserInRole(String roleName)
SecurityContext
isUserInRole
in interface SecurityContext
roleName
- a String specifying the name of the roleCopyright © 2011-2018 restSQL Project Contributors