Java org.apache.shiro.subject Subject fields, constructors, methods, implement or subclass

Example usage for Java org.apache.shiro.subject Subject fields, constructors, methods, implement or subclass

Introduction

In this page you can find the methods, fields and constructors for org.apache.shiro.subject Subject.

The text is from its open source code.

Implementation

org.apache.shiro.subject.Subject has the following implementations.
Click this link to see all its implementation.

Method

CallableassociateWith(Callable callable)
Returns a Callable instance matching the given argument while additionally ensuring that it will retain and execute under this Subject's identity.
RunnableassociateWith(Runnable runnable)
Returns a Runnable instance matching the given argument while additionally ensuring that it will retain and execute under this Subject's identity.
voidcheckPermission(String permission)
Ensures this Subject implies the specified permission String.
voidcheckPermission(Permission permission)
Ensures this Subject Permission#implies(Permission) implies the specified Permission .
voidcheckPermissions(String... permissions)
Ensures this Subject org.apache.shiro.authz.Permission#implies(org.apache.shiro.authz.Permission) implies all of the specified permission strings.
voidcheckPermissions(Collection permissions)
Ensures this Subject org.apache.shiro.authz.Permission#implies(org.apache.shiro.authz.Permission) implies all of the specified permission strings.
voidcheckRole(String roleIdentifier)
Asserts this Subject has the specified role by returning quietly if they do or throwing an org.apache.shiro.authz.AuthorizationException if they do not.
voidcheckRoles(Collection roleIdentifiers)
Asserts this Subject has all of the specified roles by returning quietly if they do or throwing an org.apache.shiro.authz.AuthorizationException if they do not.
voidcheckRoles(String... roleIdentifiers)
Same as #checkRoles(Collection roleIdentifiers) checkRoles(Collection roleIdentifiers) but doesn't require a collection as a an argument.
Vexecute(Callable callable)
Associates the specified Callable with this Subject instance and then executes it on the currently running thread.
voidexecute(Runnable runnable)
Associates the specified Runnable with this Subject instance and then executes it on the currently running thread.
PrincipalCollectiongetPreviousPrincipals()
Returns the previous 'pre run as' identity of this Subject before assuming the current #runAs runAs identity, or null if this Subject is not operating under an assumed identity (normal state).
ObjectgetPrincipal()
Returns this Subject's application-wide uniquely identifying principal, or null if this Subject is anonymous because it doesn't yet have any associated account data (for example, if they haven't logged in).
PrincipalCollectiongetPrincipals()
Returns this Subject's principals (identifying attributes) in the form of a PrincipalCollection or null if this Subject is anonymous because it doesn't yet have any associated account data (for example, if they haven't logged in).
SessiongetSession()
Returns the application Session associated with this Subject.
SessiongetSession(boolean create)
Returns the application Session associated with this Subject.
booleanhasAllRoles(Collection roleIdentifiers)
Returns true if this Subject has all of the specified roles, false otherwise.
booleanhasRole(String roleIdentifier)
Returns true if this Subject has the specified role, false otherwise.
boolean[]hasRoles(List roleIdentifiers)
Checks if this Subject has the specified roles, returning a boolean array indicating which roles are associated.
booleanisAuthenticated()
Returns true if this Subject/user proved their identity during their current session by providing valid credentials matching those known to the system, false otherwise.
booleanisPermitted(String permission)
Returns true if this Subject is permitted to perform an action or access a resource summarized by the specified permission string.
booleanisPermitted(Permission permission)
Returns true if this Subject is permitted to perform an action or access a resource summarized by the specified permission.
boolean[]isPermitted(String... permissions)
Checks if this Subject implies the given permission strings and returns a boolean array indicating which permissions are implied.
boolean[]isPermitted(List permissions)
Checks if this Subject implies the given Permissions and returns a boolean array indicating which permissions are implied.
booleanisPermittedAll(String... permissions)
Returns true if this Subject implies all of the specified permission strings, false otherwise.
booleanisPermittedAll(Collection permissions)
Returns true if this Subject implies all of the specified permissions, false otherwise.
booleanisRemembered()
Returns true if this Subject has an identity (it is not anonymous) and the identity (aka #getPrincipals() principals ) is remembered from a successful authentication during a previous session.
booleanisRunAs()
Returns true if this Subject is 'running as' another identity other than its original one or false otherwise (normal Subject state).
voidlogin(AuthenticationToken token)
Performs a login attempt for this Subject/user.
voidlogout()
Logs out this Subject and invalidates and/or removes any associated entities, such as a Session Session and authorization data.
PrincipalCollectionreleaseRunAs()
Releases the current 'run as' (assumed) identity and reverts back to the previous 'pre run as' identity that existed before #runAs runAs was called.
voidrunAs(PrincipalCollection principals)
Allows this subject to 'run as' or 'assume' another identity indefinitely.