public class ShiroSecurityContext extends Object implements javax.ws.rs.core.SecurityContext
SecurityContext
that exposes the current Shiro Subject
as a Principal
.
The isUserInRole(String)
method returns the result of Subject.hasRole(String)
.Constructor and Description |
---|
ShiroSecurityContext(javax.ws.rs.container.ContainerRequestContext containerRequestContext) |
Modifier and Type | Method and Description |
---|---|
String |
getAuthenticationScheme() |
Principal |
getUserPrincipal() |
boolean |
isSecure() |
boolean |
isUserInRole(String role) |
public ShiroSecurityContext(javax.ws.rs.container.ContainerRequestContext containerRequestContext)
public Principal getUserPrincipal()
getUserPrincipal
in interface javax.ws.rs.core.SecurityContext
public boolean isUserInRole(String role)
isUserInRole
in interface javax.ws.rs.core.SecurityContext
public boolean isSecure()
isSecure
in interface javax.ws.rs.core.SecurityContext
public String getAuthenticationScheme()
getAuthenticationScheme
in interface javax.ws.rs.core.SecurityContext
Copyright © 2004–2016 The Apache Software Foundation. All rights reserved.