cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From cohei...@apache.org
Subject cxf git commit: Make it easier to change the name Id Format
Date Mon, 25 Jan 2016 16:40:15 GMT
Repository: cxf
Updated Branches:
  refs/heads/master c545843c6 -> 96b9016d8


Make it easier to change the name Id Format


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

Branch: refs/heads/master
Commit: 96b9016d840c903a9cbacd211dd0ec1bf93dc454
Parents: c545843
Author: Colm O hEigeartaigh <coheigea@apache.org>
Authored: Mon Jan 25 16:40:03 2016 +0000
Committer: Colm O hEigeartaigh <coheigea@apache.org>
Committed: Mon Jan 25 16:40:03 2016 +0000

----------------------------------------------------------------------
 .../security/saml/sso/DefaultAuthnRequestBuilder.java  | 13 ++++++++++---
 1 file changed, 10 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/96b9016d/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/DefaultAuthnRequestBuilder.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/DefaultAuthnRequestBuilder.java
b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/DefaultAuthnRequestBuilder.java
index 1aff3b2..0c3c535 100644
--- a/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/DefaultAuthnRequestBuilder.java
+++ b/rt/rs/security/sso/saml/src/main/java/org/apache/cxf/rs/security/saml/sso/DefaultAuthnRequestBuilder.java
@@ -39,6 +39,7 @@ public class DefaultAuthnRequestBuilder implements AuthnRequestBuilder {
     private boolean forceAuthn;
     private boolean isPassive;
     private String protocolBinding = "urn:oasis:names:tc:SAML:2.0:bindings:HTTP-POST";
+    private String nameIDFormat = "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent";
     
     /**
      * Create a SAML 2.0 Protocol AuthnRequest
@@ -52,9 +53,7 @@ public class DefaultAuthnRequestBuilder implements AuthnRequestBuilder {
             SamlpRequestComponentBuilder.createIssuer(issuerId);
         
         NameIDPolicy nameIDPolicy =
-            SamlpRequestComponentBuilder.createNameIDPolicy(
-                true, "urn:oasis:names:tc:SAML:2.0:nameid-format:persistent", issuerId
-            );
+            SamlpRequestComponentBuilder.createNameIDPolicy(true, nameIDFormat, issuerId);
         
         AuthnContextClassRef authnCtxClassRef =
             SamlpRequestComponentBuilder.createAuthnCtxClassRef(
@@ -103,5 +102,13 @@ public class DefaultAuthnRequestBuilder implements AuthnRequestBuilder
{
     public void setProtocolBinding(String protocolBinding) {
         this.protocolBinding = protocolBinding;
     }
+
+    public String getNameIDFormat() {
+        return nameIDFormat;
+    }
+
+    public void setNameIDFormat(String nameIDFormat) {
+        this.nameIDFormat = nameIDFormat;
+    }
     
 }


Mime
View raw message