You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2015/04/02 13:40:57 UTC
cxf git commit: [CXF-6317] Updating authorizing interceptors to use
unique ids bby default
Repository: cxf
Updated Branches:
refs/heads/master 553f1a8c7 -> ff1068002
[CXF-6317] Updating authorizing interceptors to use unique ids bby default
Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/ff106800
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/ff106800
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/ff106800
Branch: refs/heads/master
Commit: ff10680026c6a8665e9b0afaa5640832d7e0ee83
Parents: 553f1a8
Author: Sergey Beryozkin <sb...@talend.com>
Authored: Thu Apr 2 12:40:37 2015 +0100
Committer: Sergey Beryozkin <sb...@talend.com>
Committed: Thu Apr 2 12:40:37 2015 +0100
----------------------------------------------------------------------
.../security/AbstractAuthorizingInInterceptor.java | 6 ++++--
.../interceptor/security/SecureAnnotationsInterceptor.java | 7 +++++++
.../interceptor/security/SimpleAuthorizingInterceptor.java | 7 +++++++
3 files changed, 18 insertions(+), 2 deletions(-)
----------------------------------------------------------------------
http://git-wip-us.apache.org/repos/asf/cxf/blob/ff106800/core/src/main/java/org/apache/cxf/interceptor/security/AbstractAuthorizingInInterceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/interceptor/security/AbstractAuthorizingInInterceptor.java b/core/src/main/java/org/apache/cxf/interceptor/security/AbstractAuthorizingInInterceptor.java
index d4f22f1..640edff 100644
--- a/core/src/main/java/org/apache/cxf/interceptor/security/AbstractAuthorizingInInterceptor.java
+++ b/core/src/main/java/org/apache/cxf/interceptor/security/AbstractAuthorizingInInterceptor.java
@@ -41,9 +41,11 @@ public abstract class AbstractAuthorizingInInterceptor extends AbstractPhaseInte
private boolean allowAnonymousUsers = true;
public AbstractAuthorizingInInterceptor() {
- super(Phase.PRE_INVOKE);
+ this(true);
+ }
+ public AbstractAuthorizingInInterceptor(boolean uniqueId) {
+ super(null, Phase.PRE_INVOKE, uniqueId);
}
-
public void handleMessage(Message message) throws Fault {
Method method = getTargetMethod(message);
SecurityContext sc = message.get(SecurityContext.class);
http://git-wip-us.apache.org/repos/asf/cxf/blob/ff106800/core/src/main/java/org/apache/cxf/interceptor/security/SecureAnnotationsInterceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/interceptor/security/SecureAnnotationsInterceptor.java b/core/src/main/java/org/apache/cxf/interceptor/security/SecureAnnotationsInterceptor.java
index f7cba43..00e3277 100644
--- a/core/src/main/java/org/apache/cxf/interceptor/security/SecureAnnotationsInterceptor.java
+++ b/core/src/main/java/org/apache/cxf/interceptor/security/SecureAnnotationsInterceptor.java
@@ -48,6 +48,13 @@ public class SecureAnnotationsInterceptor extends SimpleAuthorizingInterceptor {
private String annotationClassName = DEFAULT_ANNOTATION_CLASS_NAME;
+ public SecureAnnotationsInterceptor() {
+ this(true);
+ }
+ public SecureAnnotationsInterceptor(boolean uniqueId) {
+ super(uniqueId);
+ }
+
public void setAnnotationClassName(String name) {
try {
ClassLoaderUtils.loadClass(name, SecureAnnotationsInterceptor.class);
http://git-wip-us.apache.org/repos/asf/cxf/blob/ff106800/core/src/main/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptor.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptor.java b/core/src/main/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptor.java
index b6c3c33..a3e6079 100644
--- a/core/src/main/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptor.java
+++ b/core/src/main/java/org/apache/cxf/interceptor/security/SimpleAuthorizingInterceptor.java
@@ -36,6 +36,13 @@ public class SimpleAuthorizingInterceptor extends AbstractAuthorizingInIntercept
protected List<String> globalRoles = Collections.emptyList();
private boolean checkConfiguredRolesOnly;
+ public SimpleAuthorizingInterceptor() {
+ this(true);
+ }
+ public SimpleAuthorizingInterceptor(boolean uniqueId) {
+ super(uniqueId);
+ }
+
@Override
protected boolean isUserInRole(SecurityContext sc, List<String> roles, boolean deny) {
if (!checkConfiguredRolesOnly && !super.isUserInRole(sc, roles, deny)) {