cxf-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From serg...@apache.org
Subject cxf git commit: Simplifying OIDCDynamicRegistationService a bit
Date Mon, 19 Dec 2016 12:15:46 GMT
Repository: cxf
Updated Branches:
  refs/heads/3.1.x-fixes c4f7b19c1 -> 87b608891


Simplifying OIDCDynamicRegistationService a bit


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

Branch: refs/heads/3.1.x-fixes
Commit: 87b6088918922bea88483301c8d0fa4f359df0eb
Parents: c4f7b19
Author: Sergey Beryozkin <sberyozkin@gmail.com>
Authored: Mon Dec 19 12:13:08 2016 +0000
Committer: Sergey Beryozkin <sberyozkin@gmail.com>
Committed: Mon Dec 19 12:15:25 2016 +0000

----------------------------------------------------------------------
 .../oidc/idp/OidcClientRegistration.java        | 27 -------------------
 .../idp/OidcDynamicRegistrationService.java     | 28 ++++++++++----------
 2 files changed, 14 insertions(+), 41 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/cxf/blob/87b60889/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcClientRegistration.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcClientRegistration.java
b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcClientRegistration.java
deleted file mode 100644
index fd717d9..0000000
--- a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcClientRegistration.java
+++ /dev/null
@@ -1,27 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-package org.apache.cxf.rs.security.oidc.idp;
-
-import org.apache.cxf.rs.security.oauth2.services.ClientRegistration;
-
-public class OidcClientRegistration extends ClientRegistration {
-
-    private static final long serialVersionUID = -7941815270850562749L;
-        
-}

http://git-wip-us.apache.org/repos/asf/cxf/blob/87b60889/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcDynamicRegistrationService.java
----------------------------------------------------------------------
diff --git a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcDynamicRegistrationService.java
b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcDynamicRegistrationService.java
index 66a2baf..ccbc191 100644
--- a/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcDynamicRegistrationService.java
+++ b/rt/rs/security/sso/oidc/src/main/java/org/apache/cxf/rs/security/oidc/idp/OidcDynamicRegistrationService.java
@@ -18,32 +18,32 @@
  */
 package org.apache.cxf.rs.security.oidc.idp;
 
-import javax.ws.rs.Consumes;
-import javax.ws.rs.POST;
-import javax.ws.rs.Produces;
-import javax.ws.rs.core.Response;
-
 import org.apache.cxf.rs.security.oauth2.common.Client;
 import org.apache.cxf.rs.security.oauth2.services.ClientRegistration;
+import org.apache.cxf.rs.security.oauth2.services.ClientRegistrationResponse;
 import org.apache.cxf.rs.security.oauth2.services.DynamicRegistrationService;
 
 public class OidcDynamicRegistrationService extends DynamicRegistrationService {
     private boolean protectIdTokenWithClientSecret;
     
-    @POST
-    @Consumes("application/json")
-    @Produces("application/json")
-    public Response register(OidcClientRegistration request) {
-        return super.register(request);
-    }
-    
     @Override
     protected Client createNewClient(ClientRegistration request) {
-        // TODO: cast to OidcClientRegistrationRequest, 
-        // set OIDC specific properties as Client extra properties 
+        //TODO: set OIDC specific properties as Client extra properties 
         return super.createNewClient(request);
     }
     
+    @Override
+    protected ClientRegistrationResponse fromClientToRegistrationResponse(Client client)
{
+        //TODO: check OIDC specific properties in Client extra properties
+        return super.fromClientToRegistrationResponse(client);
+    }
+    
+    @Override
+    protected ClientRegistration fromClientToClientRegistration(Client client) {
+        //TODO: check OIDC specific properties in Client extra properties
+        return super.fromClientToClientRegistration(client);
+    }
+    
     protected int getClientSecretSizeInBytes(ClientRegistration request) {
            
         // TODO: may need to be 384/8 or 512/8 if not a default HS256 but HS384 or HS512


Mime
View raw message