| com.ecyrd.jspwiki.auth.Authorizer
All known Subclasses: com.ecyrd.jspwiki.auth.authorize.GroupManager,
Authorizer | public interface Authorizer (Code) | | Interface for service providers of authorization information.
author: Andrew Jaquith since: 2.3 |
findRole | public Principal findRole(String role)(Code) | | Looks up and returns a role Principal matching a given String.
If a matching role cannot be found, this method returns null .
Note that it may not always be feasible for an Authorizer
implementation to return a role Principal.
Parameters: role - the name of the role to retrieve the role Principal |
getRoles | public Principal[] getRoles()(Code) | | Returns an array of role Principals this Authorizer knows about.
This method will always return an array; an implementing class may
choose to return an zero-length array if it has no ability to identify
the roles under its control.
an array of Principals representing the roles |
isUserInRole | public boolean isUserInRole(WikiSession session, Principal role)(Code) | | Determines whether the Subject associated with a WikiSession is in a
particular role. This method takes two parameters: the WikiSession
containing the subject and the desired role ( which may be a Role or a
Group). If either parameter is null , this method must
return false .
Parameters: session - the current WikiSession Parameters: role - the role to check true if the user is considered to be in the role,false otherwise |
|
|