You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by co...@apache.org on 2017/09/06 09:20:14 UTC

[1/3] cxf git commit: Added switch to disable the generation of a Lifetime element in a class derived from AbstractOperation. This closes #311.

Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes 46d5cebc9 -> c47e3ae4c


Added switch to disable the generation of a Lifetime element in a class derived from AbstractOperation. This closes #311.

Signed-off-by: Colm O hEigeartaigh <co...@apache.org>

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


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

Branch: refs/heads/3.1.x-fixes
Commit: 51db38c5d11ac39aad26895cb0c9b5012de885a6
Parents: 46d5ceb
Author: val <val>
Authored: Tue Sep 5 00:53:26 2017 -0500
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Wed Sep 6 10:19:53 2017 +0100

----------------------------------------------------------------------
 .../apache/cxf/sts/operation/AbstractOperation.java   | 11 ++++++++++-
 .../apache/cxf/sts/operation/TokenIssueOperation.java | 13 ++++++++-----
 .../apache/cxf/sts/operation/TokenRenewOperation.java | 10 ++++++----
 .../cxf/sts/operation/TokenValidateOperation.java     | 14 ++++++++------
 4 files changed, 32 insertions(+), 16 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/51db38c5/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 733d909..53d7099 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
@@ -104,7 +104,8 @@ public abstract class AbstractOperation {
     protected List<TokenDelegationHandler> delegationHandlers = new ArrayList<>();
     protected TokenWrapper tokenWrapper = new DefaultTokenWrapper();
     protected boolean allowCustomContent;
-    
+    protected boolean includeLifetimeElement = true;
+
     public boolean isAllowCustomContent() {
         return allowCustomContent;
     }
@@ -180,6 +181,14 @@ public abstract class AbstractOperation {
     public void setClaimsManager(ClaimsManager claimsManager) {
         this.claimsManager = claimsManager;
     }
+
+    public void setIncludeLifetimeElement(boolean value) {
+        this.includeLifetimeElement = value;
+    }
+
+    public boolean getIncludeLifetimeElement() {
+        return this.includeLifetimeElement;
+    }
     
     /**
      * Check the arguments from the STSProvider and parse the request.

http://git-wip-us.apache.org/repos/asf/cxf/blob/51db38c5/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenIssueOperation.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenIssueOperation.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenIssueOperation.java
index cffd284..5e9821d 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenIssueOperation.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenIssueOperation.java
@@ -75,7 +75,7 @@ import org.apache.xml.security.exceptions.XMLSecurityException;
 public class TokenIssueOperation extends AbstractOperation implements IssueOperation, IssueSingleOperation {
 
     static final Logger LOG = LogUtils.getL7dLogger(TokenIssueOperation.class);
-
+    
 
     public RequestSecurityTokenResponseCollectionType issue(
             RequestSecurityTokenType request,
@@ -354,10 +354,13 @@ public class TokenIssueOperation extends AbstractOperation implements IssueOpera
         }
 
         // Lifetime
-        LifetimeType lifetime = 
-            createLifetime(tokenResponse.getCreated(), tokenResponse.getExpires());
-        JAXBElement<LifetimeType> lifetimeType = QNameConstants.WS_TRUST_FACTORY.createLifetime(lifetime);
-        response.getAny().add(lifetimeType);
+        if (includeLifetimeElement) {
+            LifetimeType lifetime =
+                createLifetime(tokenResponse.getCreated(), tokenResponse.getExpires());
+            JAXBElement<LifetimeType> lifetimeType =
+                QNameConstants.WS_TRUST_FACTORY.createLifetime(lifetime);
+            response.getAny().add(lifetimeType);
+        }
 
         // KeySize
         long keySize = tokenResponse.getKeySize();

http://git-wip-us.apache.org/repos/asf/cxf/blob/51db38c5/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenRenewOperation.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenRenewOperation.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenRenewOperation.java
index a21a1f0..40afe8a 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenRenewOperation.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenRenewOperation.java
@@ -270,10 +270,12 @@ public class TokenRenewOperation extends AbstractOperation implements RenewOpera
         response.getAny().add(tokenRequirements.getAppliesTo());
 
         // Lifetime
-        LifetimeType lifetime = 
-            createLifetime(tokenRenewerResponse.getCreated(), tokenRenewerResponse.getExpires());
-        JAXBElement<LifetimeType> lifetimeType = QNameConstants.WS_TRUST_FACTORY.createLifetime(lifetime);
-        response.getAny().add(lifetimeType);
+        if (includeLifetimeElement) {
+            LifetimeType lifetime =
+                createLifetime(tokenRenewerResponse.getCreated(), tokenRenewerResponse.getExpires());
+            JAXBElement<LifetimeType> lifetimeType = QNameConstants.WS_TRUST_FACTORY.createLifetime(lifetime);
+            response.getAny().add(lifetimeType);
+        }
 
         return response;
     }

http://git-wip-us.apache.org/repos/asf/cxf/blob/51db38c5/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenValidateOperation.java
----------------------------------------------------------------------
diff --git a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenValidateOperation.java b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenValidateOperation.java
index 4976356..a1befe4 100644
--- a/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenValidateOperation.java
+++ b/services/sts/sts-core/src/main/java/org/apache/cxf/sts/operation/TokenValidateOperation.java
@@ -229,12 +229,14 @@ public class TokenValidateOperation extends AbstractOperation implements Validat
             response.getAny().add(requestedToken);
             
             // Lifetime
-            LifetimeType lifetime = 
-                createLifetime(tokenProviderResponse.getCreated(), tokenProviderResponse.getExpires());
-            JAXBElement<LifetimeType> lifetimeType =
-                QNameConstants.WS_TRUST_FACTORY.createLifetime(lifetime);
-            response.getAny().add(lifetimeType);
-            
+            if (includeLifetimeElement) {
+                LifetimeType lifetime =
+                    createLifetime(tokenProviderResponse.getCreated(), tokenProviderResponse.getExpires());
+                JAXBElement<LifetimeType> lifetimeType =
+                    QNameConstants.WS_TRUST_FACTORY.createLifetime(lifetime);
+                response.getAny().add(lifetimeType);
+            }
+
             if (returnReferences) {
                 // RequestedAttachedReference
                 TokenReference attachedReference = tokenProviderResponse.getAttachedReference();


[2/3] cxf git commit: Minor fix to last commit

Posted by co...@apache.org.
Minor fix to last commit

# 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/4343b7c8
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/4343b7c8
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/4343b7c8

Branch: refs/heads/3.1.x-fixes
Commit: 4343b7c8c2115fa93983557e50da4d247e601ad4
Parents: 51db38c
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Wed Sep 6 10:14:42 2017 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Wed Sep 6 10:20:08 2017 +0100

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


http://git-wip-us.apache.org/repos/asf/cxf/blob/4343b7c8/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 53d7099..e72e526 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
@@ -186,10 +186,10 @@ public abstract class AbstractOperation {
         this.includeLifetimeElement = value;
     }
 
-    public boolean getIncludeLifetimeElement() {
-        return this.includeLifetimeElement;
+    public boolean isIncludeLifetimeElement() {
+        return includeLifetimeElement;
     }
-    
+
     /**
      * Check the arguments from the STSProvider and parse the request.
      */


[3/3] cxf git commit: Recording .gitmergeinfo Changes

Posted by co...@apache.org.
Recording .gitmergeinfo Changes


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

Branch: refs/heads/3.1.x-fixes
Commit: c47e3ae4c54710def9e9901e660ab9ae36e8fe67
Parents: 4343b7c
Author: Colm O hEigeartaigh <co...@apache.org>
Authored: Wed Sep 6 10:20:09 2017 +0100
Committer: Colm O hEigeartaigh <co...@apache.org>
Committed: Wed Sep 6 10:20:09 2017 +0100

----------------------------------------------------------------------
 .gitmergeinfo | 2 ++
 1 file changed, 2 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/c47e3ae4/.gitmergeinfo
----------------------------------------------------------------------
diff --git a/.gitmergeinfo b/.gitmergeinfo
index 921db52..d8b8fa8 100644
--- a/.gitmergeinfo
+++ b/.gitmergeinfo
@@ -751,6 +751,7 @@ M 896f1abec915897967905762d6e850cfb6bac3bc
 M 8aebfa30047f32e3a6b4feb7ffdd89208ec4f435
 M 8b5ad0005d5e42bb51a90c6773aae12c5022f78b
 M 8b78d8c82accc1f0beca55eef8d5bce87c7af792
+M 8c0d43fc9e995cd34541bf711cfb7d607deda377
 M 8c6401b76ca76010e7e169656fd2f5fae6f3245a
 M 8c7b7bb3a6b86632d73da57b6567dd9bb4157f31
 M 8dadf3defb43d13169943b191204be93da63c88b
@@ -901,6 +902,7 @@ M f9a42a528f4edfa7bcc62d5885eebaeb25224cec
 M fa973bd7ab43099151f83beea351b80c7140eaab
 M fade9b81dabe27f864ca38e7b40f28fb44d6f165
 M faf461150f178f7f7ae89a3b7c345671e53b8b04
+M fca2253915f5285a36360b48cb7e1b1c7a95982e
 M fd6689948bc7ad153ccfd7f64554eafbf64b20d6
 M fe55813cc934667664863117921ff8ea08b9ff24
 M fe89bf0fb8379428667f66312e6942e906142d6f