public class ShiroSecurityContext extends Object implements org.modeshape.jcr.security.SecurityContext
Constructor and Description |
---|
ShiroSecurityContext(org.apache.shiro.subject.Subject user)
Create a new security context using the given Shiro subject.
|
Modifier and Type | Method and Description |
---|---|
String |
getUserName() |
boolean |
hasRole(String roleName) |
boolean |
isAnonymous() |
void |
logout() |
public ShiroSecurityContext(org.apache.shiro.subject.Subject user)
SecurityUtils.getSubject()
.user
- subject to create the security context forpublic boolean isAnonymous()
isAnonymous
in interface org.modeshape.jcr.security.SecurityContext
public String getUserName()
getUserName
in interface org.modeshape.jcr.security.SecurityContext
public boolean hasRole(String roleName)
hasRole
in interface org.modeshape.jcr.security.SecurityContext
public void logout()
logout
in interface org.modeshape.jcr.security.SecurityContext
Copyright © 2013–2019 DuraSpace, Inc.. All rights reserved.