Class UserDN
java.lang.Object
org.opends.server.authorization.dseecompat.UserDN
- All Implemented Interfaces:
KeywordBindRule
This class represents the userdn keyword in a bind rule.
-
Method Summary
Modifier and TypeMethodDescriptionstatic KeywordBindRuledecode(String expression, org.opends.server.authorization.dseecompat.EnumBindRuleType type) Decodes an expression string representing a userdn bind rule.static booleanevaluate(Entry e, Dn clientDN, AttributeType attrType) This method searches an entry for an attribute value that is treated as a DN.evaluate(AciEvalContext evalCtx) Performs the evaluation of a userdn bind rule based on the evaluation context passed to it.static booleanevalURL(AciEvalContext evalCtx, LDAPURL url) This method evaluates a URL userdn expression.toString()voidtoString(StringBuilder buffer) Appends a string representation of this object to the provided buffer.
-
Method Details
-
decode
public static KeywordBindRule decode(String expression, org.opends.server.authorization.dseecompat.EnumBindRuleType type) throws AciException Decodes an expression string representing a userdn bind rule.- Parameters:
expression- The string representation of the userdn bind rule expression.type- An enumeration of the type of the bind rule.- Returns:
- A KeywordBindRule class that represents the bind rule.
- Throws:
AciException- If the expression failed to LDAP URL decode.
-
evaluate
Performs the evaluation of a userdn bind rule based on the evaluation context passed to it. The evaluation stops when there are no more UserDNTypeURLs to evaluate or if an UserDNTypeURL evaluates to true.- Specified by:
evaluatein interfaceKeywordBindRule- Parameters:
evalCtx- The evaluation context to evaluate with.- Returns:
- An evaluation result enumeration containing the result of the evaluation.
-
evalURL
This method evaluates a URL userdn expression. Something like: ldap:///suffix??sub?(filter). It also searches for the client DN entry and saves it in the evaluation context for repeat evaluations that might come later in processing.- Parameters:
evalCtx- The evaluation context to use.url- URL containing the URL to use in the evaluation.- Returns:
- the evaluation result.
-
evaluate
This method searches an entry for an attribute value that is treated as a DN. That DN is then compared against the client DN.- Parameters:
e- The entry to get the attribute type from.clientDN- The client authorization DN to check for.attrType- The attribute type from the bind rule.- Returns:
- An enumeration with the result.
-
toString
-
toString
Description copied from interface:KeywordBindRuleAppends a string representation of this object to the provided buffer.- Specified by:
toStringin interfaceKeywordBindRule- Parameters:
buffer- The buffer into which a string representation of this object should be appended.
-