|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.openpermis.subject.assignment.RoleAssignmentController<T>
org.openpermis.subject.assignment.CachingRoleAssignmentController<LdapContext>
org.openpermis.subject.assignment.ldap.LdapController
public class LdapController
Controls file based role assignments contained in a local directory.
Reads all files in the directory and its sub directories. Writes new files to root directory, specified at construction time.
Constructor Summary | |
---|---|
LdapController(String ldapUrl,
String bindPrincipal,
String bindPrincipalPassword,
String ldapSearchBase,
Decoder<LdapContext> decoder,
Encoder encoder)
Creates an ldap controller that controls ldap entries contained in the specified ldap server. |
Method Summary | |
---|---|
protected void |
closeInitialLdapContext()
|
protected LdapContext |
creatingNewContext(URI identity,
URI issuer,
Set<RoleDefinition> roles,
Date validFrom,
Date validTo)
Creates a context for a role assignment. |
protected List<LdapContext> |
getContexts()
Returns all contexts of this controller. |
protected byte[] |
readFromContext(LdapContext context)
Reads the content of a context. |
protected void |
revokingAssignment(RoleAssignment<LdapContext> roleAssignment)
Revoking the specified role assignment. |
protected void |
writeToContext(LdapContext context,
byte[] content)
Writes the a byte array into a context. |
Methods inherited from class org.openpermis.subject.assignment.CachingRoleAssignmentController |
---|
createContext, issue, list, normalize, refresh, revoke |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public LdapController(String ldapUrl, String bindPrincipal, String bindPrincipalPassword, String ldapSearchBase, Decoder<LdapContext> decoder, Encoder encoder)
If the encoder is null
this controller supports only read operations.
ldapUrl
- The LDAP URL. Example: "ldap://foo.host.com:389"bindPrincipal
- The distinguished name of the principal used to bind at the directory
to perform the search. Use null
as value to anonymously bind.bindPrincipalPassword
- The password of the principal to bind at the directory to
perform the search. Use null
as value to anonymously bind.ldapSearchBase
- The search base.decoder
- used to decode role assignments.encoder
- used to encode role assignments.Method Detail |
---|
protected void closeInitialLdapContext() throws RoleAssignmentControllerException
RoleAssignmentControllerException
protected void writeToContext(LdapContext context, byte[] content) throws RoleAssignmentControllerException
CachingRoleAssignmentController
writeToContext
in class CachingRoleAssignmentController<LdapContext>
context
- the context in which the byte array is written.content
- the byte array that gets written into the context.
RoleAssignmentControllerException
- signals that the assignment failed.protected byte[] readFromContext(LdapContext context) throws RoleAssignmentControllerException
CachingRoleAssignmentController
readFromContext
in class CachingRoleAssignmentController<LdapContext>
context
- the context whose content is returned.
RoleAssignmentControllerException
- signals that the assignment failed.protected List<LdapContext> getContexts()
CachingRoleAssignmentController
getContexts
in class CachingRoleAssignmentController<LdapContext>
protected LdapContext creatingNewContext(URI identity, URI issuer, Set<RoleDefinition> roles, Date validFrom, Date validTo)
CachingRoleAssignmentController
creatingNewContext
in class CachingRoleAssignmentController<LdapContext>
identity
- holder of the role assignment.issuer
- the issuer of the role assignment.roles
- roles of the role assignment,validFrom
- the validity start of the role assignment.validTo
- the validity end of the role assignment.
protected void revokingAssignment(RoleAssignment<LdapContext> roleAssignment) throws RoleAssignmentControllerException
CachingRoleAssignmentController
revokingAssignment
in class CachingRoleAssignmentController<LdapContext>
roleAssignment
- the role assignment to revoke.
RoleAssignmentControllerException
- signals that the specified role assignment could
not be revoked.
|
![]() |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
OpenPermis Role Based Access Control 0.9.0 (Build 16)
2009/08/13 07:16:59
Copyright (c) 2002-2007 Ergon Informatik AG