cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject [2/3] cxf git commit: Only map principals when both realms are non-null
Date Fri, 12 May 2017 12:24:48 GMT
Only map principals when both realms are non-null

# Conflicts:
#	services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java


Project: http://git-wip-us.apache.org/repos/asf/cxf/repo
Commit: http://git-wip-us.apache.org/repos/asf/cxf/commit/2b7d4200
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/2b7d4200
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/2b7d4200

Branch: refs/heads/3.1.x-fixes
Commit: 2b7d42009eebfdf3005540e5621746f95786c151
Parents: 8b74995
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Fri May 12 13:23:54 2017 +0100
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Fri May 12 13:24:25 2017 +0100

----------------------------------------------------------------------
 .../java/org/apache/cxf/sts/operation/AbstractOperation.java  | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/2b7d4200/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java
b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java
index 0b48b5c..8e853d1 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/AbstractOperation.java
@@ -583,8 +583,13 @@ public abstract class AbstractOperation {
         if (responsePrincipal != null) {
             String targetRealm = providerParameters.getRealm();
             String sourceRealm = tokenResponse.getTokenRealm();
+<<<<<<< HEAD
     
             if (sourceRealm != null && !sourceRealm.equals(targetRealm)) {
+=======
+
+            if (sourceRealm != null && targetRealm != null && !sourceRealm.equals(targetRealm))
{
+>>>>>>> a71508214a... Only map principals when both realms are non-null
                 RelationshipResolver relRes = stsProperties.getRelationshipResolver();
                 Relationship relationship = null;
                 if (relRes != null) {
@@ -618,7 +623,7 @@ public abstract class AbstractOperation {
                     // principal remains unchanged                            
     
                 } else  {
-                    LOG.log(Level.SEVERE, "Unkown federation type: " + relationship.getType());
+                    LOG.log(Level.SEVERE, "Unknown federation type: " + relationship.getType());
                     throw new STSException("Error in providing a token", STSException.BAD_REQUEST);
                 }
             }


Mime
View raw message