AuthorizingSecurityManager

Shiro support of a {@link SecurityManager} class hierarchy that delegates all authorization (access control) operations to a wrapped {@link Authorizer Authorizer} instance. That is, this class implements all the <tt>Authorizer</tt> methods in the {@link SecurityManager SecurityManager} interface, but in reality, those methods are merely passthrough calls to the underlying 'real' <tt>Authorizer</tt> instance.

<p>All remaining <tt>SecurityManager</tt> methods not covered by this class or its parents (mostly Session support) are left to be implemented by subclasses.

<p>In keeping with the other classes in this hierarchy and Shiro's desire to minimize configuration whenever possible, suitable default instances for all dependencies will be created upon instantiation.

abstract
class AuthorizingSecurityManager : AuthenticatingSecurityManager {}

Constructors

this
this()

Default no-arg constructor that initializes an internal default {@link hunt.shiro.authz.ModularRealmAuthorizer ModularRealmAuthorizer}.

Members

Functions

afterRealmsSet
void afterRealmsSet()

First calls <code>super.afterRealmsSet()</code> and then sets these same <code>Realm</code> objects on this instance's wrapped {@link Authorizer Authorizer}. <p/> The setting of realms the Authorizer will only occur if it is an instance of {@link hunt.shiro.authz.ModularRealmAuthorizer ModularRealmAuthorizer}, that is: <pre> if ( this.authorizer instanceof ModularRealmAuthorizer ) { ((ModularRealmAuthorizer)this.authorizer).setRealms(realms); }</pre>

checkPermission
void checkPermission(PrincipalCollection principals, string permission)
Undocumented in source. Be warned that the author may not have intended to support it.
checkPermission
void checkPermission(PrincipalCollection principals, Permission permission)
Undocumented in source. Be warned that the author may not have intended to support it.
checkPermissions
void checkPermissions(PrincipalCollection principals, string[] permissions)
Undocumented in source. Be warned that the author may not have intended to support it.
checkPermissions
void checkPermissions(PrincipalCollection principals, Collection!(Permission) permissions)
Undocumented in source. Be warned that the author may not have intended to support it.
checkRole
void checkRole(PrincipalCollection principals, string role)
Undocumented in source. Be warned that the author may not have intended to support it.
checkRoles
void checkRoles(PrincipalCollection principals, Collection!(string) roles)
Undocumented in source. Be warned that the author may not have intended to support it.
checkRoles
void checkRoles(PrincipalCollection principals, string[] roles)
Undocumented in source. Be warned that the author may not have intended to support it.
destroy
void destroy()
Undocumented in source. Be warned that the author may not have intended to support it.
getAuthorizer
Authorizer getAuthorizer()

Returns the underlying wrapped <tt>Authorizer</tt> instance to which this <tt>SecurityManager</tt> implementation delegates all of its authorization calls.

hasAllRoles
bool hasAllRoles(PrincipalCollection principals, Collection!(string) roleIdentifiers)
Undocumented in source. Be warned that the author may not have intended to support it.
hasAllRoles
bool hasAllRoles(PrincipalCollection principals, string[] roleIdentifiers)
Undocumented in source. Be warned that the author may not have intended to support it.
hasRole
bool hasRole(PrincipalCollection principals, string roleIdentifier)
Undocumented in source. Be warned that the author may not have intended to support it.
hasRoles
bool[] hasRoles(PrincipalCollection principals, List!(string) roleIdentifiers)
Undocumented in source. Be warned that the author may not have intended to support it.
hasRoles
bool[] hasRoles(PrincipalCollection principals, string[] roleIdentifiers)
Undocumented in source. Be warned that the author may not have intended to support it.
isPermitted
bool isPermitted(PrincipalCollection principals, string permissionString)
Undocumented in source. Be warned that the author may not have intended to support it.
isPermitted
bool isPermitted(PrincipalCollection principals, Permission permission)
Undocumented in source. Be warned that the author may not have intended to support it.
isPermitted
bool[] isPermitted(PrincipalCollection principals, string[] permissions)
Undocumented in source. Be warned that the author may not have intended to support it.
isPermitted
bool[] isPermitted(PrincipalCollection principals, List!(Permission) permissions)
Undocumented in source. Be warned that the author may not have intended to support it.
isPermittedAll
bool isPermittedAll(PrincipalCollection principals, string[] permissions)
Undocumented in source. Be warned that the author may not have intended to support it.
isPermittedAll
bool isPermittedAll(PrincipalCollection principals, Collection!(Permission) permissions)
Undocumented in source. Be warned that the author may not have intended to support it.
setAuthorizer
void setAuthorizer(Authorizer authorizer)

Sets the underlying <tt>Authorizer</tt> instance to which this <tt>SecurityManager</tt> implementation will delegate all of its authorization calls.

Inherited Members

From AuthenticatingSecurityManager

getAuthenticator
Authenticator getAuthenticator()

Returns the delegate <code>Authenticator</code> instance that this SecurityManager uses to perform all authentication operations. Unless overridden by the {@link #setAuthenticator(hunt.shiro.authc.Authenticator) setAuthenticator}, the default instance is a {@link hunt.shiro.authc.pam.ModularRealmAuthenticator ModularRealmAuthenticator}.

setAuthenticator
void setAuthenticator(Authenticator authenticator)

Sets the delegate <code>Authenticator</code> instance that this SecurityManager uses to perform all authentication operations. Unless overridden by this method, the default instance is a {@link hunt.shiro.authc.pam.ModularRealmAuthenticator ModularRealmAuthenticator}.

afterRealmsSet
void afterRealmsSet()

Passes on the {@link #getRealms() realms} to the internal delegate <code>Authenticator</code> instance so that it may use them during authentication attempts.

authenticate
AuthenticationInfo authenticate(AuthenticationToken token)

Delegates to the wrapped {@link hunt.shiro.authc.Authenticator Authenticator} for authentication.

destroy
void destroy()
Undocumented in source. Be warned that the author may not have intended to support it.

Meta