cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Updating OidcConfigurationService to report an end_session_endpoint address
Date Mon, 27 Feb 2017 18:00:57 GMT
Repository: cxf
Updated Branches:
  refs/heads/master 52d774702 -> 34fd320f9


Updating OidcConfigurationService to report an end_session_endpoint address


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

Branch: refs/heads/master
Commit: 34fd320f91d933233aeb364120456f4fa0f220ac
Parents: 52d7747
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Mon Feb 27 18:00:37 2017 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Mon Feb 27 18:00:37 2017 +0000

----------------------------------------------------------------------
 .../oidc/idp/OidcConfigurationService.java      | 27 ++++++++++++++++++++
 1 file changed, 27 insertions(+)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/34fd320f/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcConfigurationService.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcConfigurationService.java
b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcConfigurationService.java
index 2563c93..bdc53d6 100644
--- a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcConfigurationService.java
+++ b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcConfigurationService.java
@@ -33,6 +33,10 @@ public class OidcConfigurationService extends AuthorizationMetadataService
{
     // Recommended - but optional
     private boolean userInfoEndpointNotAvailable;
     private String userInfoEndpointAddress;
+    
+    // Optional RP initiated logout
+    private boolean endSessionEndpointNotAvailable;
+    private String endSessionEndpointAddress;
 
     @Override
     protected void prepareConfigurationData(Map<String, Object> cfg, String baseUri)
{
@@ -49,6 +53,13 @@ public class OidcConfigurationService extends AuthorizationMetadataService
{
             cfg.put("id_token_signing_alg_values_supported",
                     Collections.singletonList(sigProps.get(JoseConstants.RSSEC_SIGNATURE_ALGORITHM)));
         }
+        
+        // RP Initiated Logout Endpoint
+        if (!isEndSessionEndpointNotAvailable()) {
+            String theEndSessionEndpointAddress =
+                calculateEndpointAddress(endSessionEndpointAddress, baseUri, "/idp/logout");
+            cfg.put("end_session_endpoint", theEndSessionEndpointAddress);
+        }
     }
 
     public boolean isUserInfoEndpointNotAvailable() {
@@ -59,4 +70,20 @@ public class OidcConfigurationService extends AuthorizationMetadataService
{
         this.userInfoEndpointNotAvailable = userInfoEndpointNotAvailable;
     }
 
+    public boolean isEndSessionEndpointNotAvailable() {
+        return endSessionEndpointNotAvailable;
+    }
+
+    public void setEndSessionEndpointNotAvailable(boolean endSessionEndpointNotAvailable)
{
+        this.endSessionEndpointNotAvailable = endSessionEndpointNotAvailable;
+    }
+
+    public String getEndSessionEndpointAddress() {
+        return endSessionEndpointAddress;
+    }
+
+    public void setEndSessionEndpointAddress(String endSessionEndpointAddress) {
+        this.endSessionEndpointAddress = endSessionEndpointAddress;
+    }
+
 }


Mime
View raw message