[java-opensaml] branch master updated: Clarify javadoc, clean up child context.
Scott Cantor
cantor.2 at osu.edu
Wed Aug 15 19:25:35 EDT 2018
This is an automated email from the git hooks/post-receive script.
scantor pushed a commit to branch master
in repository java-opensaml.
View the commit online:
http://git.shibboleth.net/view/?p=java-opensaml.git;a=commit;h=35d073b93a5f5e03d5a78c748988399486059cc5
The following commit(s) were added to refs/heads/master by this push:
new 35d073b Clarify javadoc, clean up child context.
35d073b is described below
commit 35d073b93a5f5e03d5a78c748988399486059cc5
Author: Scott Cantor <cantor.2 at osu.edu>
AuthorDate: Wed Aug 15 19:25:32 2018 -0400
Clarify javadoc, clean up child context.
---
.../java/org/opensaml/profile/logic/PredicateAccessControl.java | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/opensaml-profile-api/src/main/java/org/opensaml/profile/logic/PredicateAccessControl.java b/opensaml-profile-api/src/main/java/org/opensaml/profile/logic/PredicateAccessControl.java
index 30f6f04..23b54eb 100644
--- a/opensaml-profile-api/src/main/java/org/opensaml/profile/logic/PredicateAccessControl.java
+++ b/opensaml-profile-api/src/main/java/org/opensaml/profile/logic/PredicateAccessControl.java
@@ -36,6 +36,10 @@ import com.google.common.base.Predicate;
/**
* Access control implementation based on a predicate over a {@link ProfileRequestContext}.
*
+ * <p>To bridge the two designs, this adapter populates an {@link AccessControlContext} placed
+ * beneath the {@link ProfileRequestContext} to carry the operation and resource parameters
+ * and allow access to them from the {@link Predicate}.</p>
+ *
* @since 3.3.0
*/
public class PredicateAccessControl extends AbstractIdentifiableInitializableComponent
@@ -71,10 +75,12 @@ public class PredicateAccessControl extends AbstractIdentifiableInitializableCom
acc.setOperation(operation);
acc.setResource(resource);
if (predicate.apply(prc)) {
+ prc.removeSubcontext(acc);
log.debug("{} Granted access based on predicate (Operation: {}, Resource: {})",
new Object[] {getLogPrefix(), operation, resource});
return true;
} else {
+ prc.removeSubcontext(acc);
log.warn("{} Denied request based on predicate (Operation: {}, Resource: {})",
new Object[] {getLogPrefix(), operation, resource});
}
--
To stop receiving notification emails like this one, please contact
the administrator of this repository.
More information about the commits
mailing list