|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface PrincipalProvider
This interface defines methods to provide access to sources of
Principal
s. This allows the security framework share any external
sources for authorization and authentication, as may be used by a custom
LoginModule
for example.
for more details about principals, users and groups.
Method Summary | |
---|---|
boolean |
canReadPrincipal(Session session,
Principal principalToRead)
// TODO: review again. |
void |
close()
This is called when a provider is not longer used by the repository. |
PrincipalIterator |
findPrincipals(String simpleFilter)
Searches for Principal s that match the given String. |
PrincipalIterator |
findPrincipals(String simpleFilter,
int searchType)
Searches for Principal s that match the given String. |
PrincipalIterator |
getGroupMembership(Principal principal)
Returns an iterator over all group principals for which the given principal is either direct or indirect member of. |
Principal |
getPrincipal(String principalName)
Returns the principal with the given name if is known to this provider |
PrincipalIterator |
getPrincipals(int searchType)
Returns an iterator over all principals that match the given search type. |
void |
init(Properties options)
Initialize this provider. |
Method Detail |
---|
Principal getPrincipal(String principalName)
principalName
- the name of the principal to retrieve
null
PrincipalIterator findPrincipals(String simpleFilter)
Principal
s that match the given String.
NOTE: Group
s are included in the search result.
simpleFilter
-
findPrincipals(String,int)
PrincipalIterator findPrincipals(String simpleFilter, int searchType)
Principal
s that match the given String.
simpleFilter
- searchType
- searchType Any of the following constants:
findPrincipals(String)
PrincipalIterator getPrincipals(int searchType)
searchType
- searchType Any of the following constants:
PrincipalIterator getGroupMembership(Principal principal)
Group.isMember(Principal)
evaluates to true
. A principal is an indirect member of a
group if any of its groups (to any degree of separation) is direct memeber
of the group.
Example:
principal
- the principal to return it's membership from.
void init(Properties options)
options
- the options that are setvoid close()
boolean canReadPrincipal(Session session, Principal principalToRead)
session
- principalToRead
- The principal to be accessed by the specified subject.
true
if the subject is allowed to read the principal;
false
otherwise.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |