cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject [cxf] branch 3.1.x-fixes updated: Minor updates to OidcConfigurationService
Date Wed, 27 Sep 2017 15:35:35 GMT
This is an automated email from the ASF dual-hosted git repository.

sergeyb pushed a commit to branch 3.1.x-fixes
in repository https://gitbox.apache.org/repos/asf/cxf.git


The following commit(s) were added to refs/heads/3.1.x-fixes by this push:
     new e9e8a33  Minor updates to OidcConfigurationService
e9e8a33 is described below

commit e9e8a33900bc4ab7dbb70d7b5d23ff4112538575
Author: Sergey Beryozkin <sberyozkin@gmail.com>
AuthorDate: Wed Sep 27 16:34:20 2017 +0100

    Minor updates to OidcConfigurationService
---
 .../oidc/idp/OidcConfigurationService.java         | 23 ++++++++++++++++++++++
 1 file changed, 23 insertions(+)

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 38a5556..80241e9 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
@@ -18,7 +18,9 @@
  */
 package org.apache.cxf.rs.security.oidc.idp;
 
+import java.util.Arrays;
 import java.util.Collections;
+import java.util.List;
 import java.util.Map;
 import java.util.Properties;
 
@@ -30,6 +32,13 @@ import org.apache.cxf.rs.security.oauth2.services.AuthorizationMetadataService;
 
 @Path("openid-configuration")
 public class OidcConfigurationService extends AuthorizationMetadataService {
+    // Response types supported with the combination of 
+    // AuthorizationCode, Implicit and Hybrid services
+    private static final List<String> DEFAULT_RESPONSE_TYPES = 
+        Arrays.asList("code", "code id_token", "id_token", "token id_token");
+    // Required:
+    private List<String> responseTypes;
+    
     // Recommended - but optional
     private boolean userInfoEndpointNotAvailable;
     private String userInfoEndpointAddress;
@@ -65,6 +74,12 @@ public class OidcConfigurationService extends AuthorizationMetadataService
{
         if (isBackChannelLogoutSupported()) {
             cfg.put("backchannel_logout_supported", Boolean.TRUE);
         }
+        
+        //Subject types: pairwise is not supported yet
+        cfg.put("subject_types_supported", Collections.singletonList("public"));
+        
+        List<String> theResponseTypes = responseTypes == null ? DEFAULT_RESPONSE_TYPES
: responseTypes;
+        cfg.put("response_types_supported", theResponseTypes);
     }
 
     public boolean isUserInfoEndpointNotAvailable() {
@@ -99,4 +114,12 @@ public class OidcConfigurationService extends AuthorizationMetadataService
{
         this.backChannelLogoutSupported = backChannelLogoutSupported;
     }
 
+    public List<String> getResponseTypes() {
+        return responseTypes;
+    }
+
+    public void setResponseTypes(List<String> responseTypes) {
+        this.responseTypes = responseTypes;
+    }
+
 }

-- 
To stop receiving notification emails like this one, please contact
['"commits@cxf.apache.org" <commits@cxf.apache.org>'].

Mime
View raw message