Uses of Class
org.apache.shiro.authz.AuthorizationException
-
Packages that use AuthorizationException Package Description org.apache.shiro.authz Core interfaces and exceptions supporting Authorization (access control).org.apache.shiro.authz.aop Contains AOP implementation support classes specifically used for authorization operations, particularly supporting AOP Method Interceptors and JSR-175 metadata Annotations.org.apache.shiro.mgt Provides the masterSecurityManager
interface and a default implementation hierarchy for managing all aspects of Shiro's functionality in an application.org.apache.shiro.realm Components and sub-packages used in supporting the coreRealm
interface.org.apache.shiro.session.mgt SessionManager
components supporting enterprise session management.org.apache.shiro.subject Components supporting theSubject
interface, the most important concept in Shiro's API.org.apache.shiro.subject.support Concrete support implementations of most of theorg.apache.shiro.subject
interfaces. -
-
Uses of AuthorizationException in org.apache.shiro.authz
Subclasses of AuthorizationException in org.apache.shiro.authz Modifier and Type Class Description class
HostUnauthorizedException
Thrown when a particular client (that is, host address) has not been enabled to access the system or if the client has been enabled access but is not permitted to perform a particular operation or access a particular resource.class
UnauthenticatedException
Exception thrown when attempting to execute an authorization action when a successful authentication hasn't yet occurred.class
UnauthorizedException
Thrown to indicate a requested operation or access to a requested resource is not allowed.Methods in org.apache.shiro.authz that throw AuthorizationException Modifier and Type Method Description void
Authorizer. checkPermission(PrincipalCollection subjectPrincipal, String permission)
Ensures the corresponding Subject/user implies the specified permission String.void
Authorizer. checkPermission(PrincipalCollection subjectPrincipal, Permission permission)
Ensures a subject/userPermission.implies(Permission)
implies} the specified Permission.void
ModularRealmAuthorizer. checkPermission(PrincipalCollection principals, String permission)
If !isPermitted(permission)
, throws anUnauthorizedException
otherwise returns quietly.void
ModularRealmAuthorizer. checkPermission(PrincipalCollection principals, Permission permission)
If !isPermitted(permission)
, throws anUnauthorizedException
otherwise returns quietly.void
Authorizer. checkPermissions(PrincipalCollection subjectPrincipal, String... permissions)
Ensures the corresponding Subject/userimplies
all of the specified permission strings.void
Authorizer. checkPermissions(PrincipalCollection subjectPrincipal, Collection<Permission> permissions)
Ensures the corresponding Subject/userimplies
all of the specified permission strings.void
ModularRealmAuthorizer. checkPermissions(PrincipalCollection principals, String... permissions)
If !isPermitted(permission)
, throws anUnauthorizedException
otherwise returns quietly.void
ModularRealmAuthorizer. checkPermissions(PrincipalCollection principals, Collection<Permission> permissions)
If !isPermitted(permission)
for all the given Permissions, throws anUnauthorizedException
otherwise returns quietly.void
Authorizer. checkRole(PrincipalCollection subjectPrincipal, String roleIdentifier)
Asserts the corresponding Subject/user has the specified role by returning quietly if they do or throwing anAuthorizationException
if they do not.void
ModularRealmAuthorizer. checkRole(PrincipalCollection principals, String role)
If !hasRole(role)
, throws anUnauthorizedException
otherwise returns quietly.void
Authorizer. checkRoles(PrincipalCollection subjectPrincipal, String... roleIdentifiers)
Same ascheckRoles(PrincipalCollection subjectPrincipal, Collection<String> roleIdentifiers)
but doesn't require a collection as an argument.void
Authorizer. checkRoles(PrincipalCollection subjectPrincipal, Collection<String> roleIdentifiers)
Asserts the corresponding Subject/user has all of the specified roles by returning quietly if they do or throwing anAuthorizationException
if they do not.void
ModularRealmAuthorizer. checkRoles(PrincipalCollection principals, String... roles)
CallscheckRole
for each role specified.void
ModularRealmAuthorizer. checkRoles(PrincipalCollection principals, Collection<String> roles)
-
Uses of AuthorizationException in org.apache.shiro.authz.aop
Methods in org.apache.shiro.authz.aop that throw AuthorizationException Modifier and Type Method Description protected void
AnnotationsAuthorizingMethodInterceptor. assertAuthorized(MethodInvocation methodInvocation)
Iterates over the internalmethodInterceptors
collection, and for each one, ensures that if the interceptorsupports
the invocation, that the interceptorasserts
that the invocation is authorized to proceed.abstract void
AuthorizingAnnotationHandler. assertAuthorized(Annotation a)
Ensures the calling Subject is authorized to execute based on the directive(s) found in the given annotation.void
AuthorizingAnnotationMethodInterceptor. assertAuthorized(MethodInvocation mi)
Ensures the calling Subject is authorized to execute the specifiedMethodInvocation
.protected abstract void
AuthorizingMethodInterceptor. assertAuthorized(MethodInvocation methodInvocation)
Asserts that the specified MethodInvocation is allowed to continue by performing any necessary authorization (access control) checks first.void
GuestAnnotationHandler. assertAuthorized(Annotation a)
Ensures that the callingSubject
is NOT a user, that is, they do not have anidentity
before continuing.void
PermissionAnnotationHandler. assertAuthorized(Annotation a)
Ensures that the callingSubject
has the Annotation's specified permissions, and if not, throws anAuthorizingException
indicating access is denied.void
RoleAnnotationHandler. assertAuthorized(Annotation a)
Ensures that the callingSubject
has the Annotation's specified roles, and if not, throws anAuthorizingException
indicating that access is denied.void
UserAnnotationHandler. assertAuthorized(Annotation a)
Ensures that the callingSubject
is a user, that is, they are eitherauthenticated
or remembered via remember me services before allowing access, and if not, throws anAuthorizingException
indicating access is not allowed. -
Uses of AuthorizationException in org.apache.shiro.mgt
Methods in org.apache.shiro.mgt that throw AuthorizationException Modifier and Type Method Description void
AuthorizingSecurityManager. checkPermission(PrincipalCollection principals, String permission)
void
AuthorizingSecurityManager. checkPermission(PrincipalCollection principals, Permission permission)
void
AuthorizingSecurityManager. checkPermissions(PrincipalCollection principals, String... permissions)
void
AuthorizingSecurityManager. checkPermissions(PrincipalCollection principals, Collection<Permission> permissions)
void
AuthorizingSecurityManager. checkRole(PrincipalCollection principals, String role)
void
AuthorizingSecurityManager. checkRoles(PrincipalCollection principals, String... roles)
void
AuthorizingSecurityManager. checkRoles(PrincipalCollection principals, Collection<String> roles)
Session
SessionsSecurityManager. start(SessionContext context)
-
Uses of AuthorizationException in org.apache.shiro.realm
Methods in org.apache.shiro.realm that throw AuthorizationException Modifier and Type Method Description void
AuthorizingRealm. checkPermission(PrincipalCollection subjectIdentifier, String permission)
void
AuthorizingRealm. checkPermission(PrincipalCollection principal, Permission permission)
void
AuthorizingRealm. checkPermissions(PrincipalCollection subjectIdentifier, String... permissions)
void
AuthorizingRealm. checkPermissions(PrincipalCollection principal, Collection<Permission> permissions)
void
AuthorizingRealm. checkRole(PrincipalCollection principal, String role)
void
AuthorizingRealm. checkRoles(PrincipalCollection principal, String... roles)
void
AuthorizingRealm. checkRoles(PrincipalCollection principal, Collection<String> roles)
-
Uses of AuthorizationException in org.apache.shiro.session.mgt
Methods in org.apache.shiro.session.mgt that throw AuthorizationException Modifier and Type Method Description protected abstract Session
AbstractNativeSessionManager. createSession(SessionContext context)
Creates a newSession Session
instance based on the specified (possiblynull
) initialization data.protected Session
AbstractValidatingSessionManager. createSession(SessionContext context)
protected abstract Session
AbstractValidatingSessionManager. doCreateSession(SessionContext initData)
-
Uses of AuthorizationException in org.apache.shiro.subject
Methods in org.apache.shiro.subject that throw AuthorizationException Modifier and Type Method Description void
Subject. checkPermission(String permission)
Ensures this Subject implies the specified permission String.void
Subject. checkPermission(Permission permission)
Ensures this Subjectimplies
the specifiedPermission
.void
Subject. checkPermissions(String... permissions)
Ensures this Subjectimplies
all of the specified permission strings.void
Subject. checkPermissions(Collection<Permission> permissions)
Ensures this Subjectimplies
all of the specified permission strings.void
Subject. checkRole(String roleIdentifier)
Asserts this Subject has the specified role by returning quietly if they do or throwing anAuthorizationException
if they do not.void
Subject. checkRoles(String... roleIdentifiers)
Same ascheckRoles(Collection
but doesn't require a collection as a an argument.roleIdentifiers) void
Subject. checkRoles(Collection<String> roleIdentifiers)
Asserts this Subject has all of the specified roles by returning quietly if they do or throwing anAuthorizationException
if they do not. -
Uses of AuthorizationException in org.apache.shiro.subject.support
Methods in org.apache.shiro.subject.support that throw AuthorizationException Modifier and Type Method Description protected void
DelegatingSubject. assertAuthzCheckPossible()
void
DelegatingSubject. checkPermission(String permission)
void
DelegatingSubject. checkPermission(Permission permission)
void
DelegatingSubject. checkPermissions(String... permissions)
void
DelegatingSubject. checkPermissions(Collection<Permission> permissions)
void
DelegatingSubject. checkRole(String role)
void
DelegatingSubject. checkRoles(String... roleIdentifiers)
void
DelegatingSubject. checkRoles(Collection<String> roles)
-