You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@cxf.apache.org by se...@apache.org on 2016/12/19 12:13:24 UTC
cxf git commit: Simplifying OIDCDynamicRegistationService a bit
Repository: cxf
Updated Branches:
refs/heads/master 440538282 -> 5a6a30faa
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/5a6a30fa
Tree: http://git-wip-us.apache.org/repos/asf/cxf/tree/5a6a30fa
Diff: http://git-wip-us.apache.org/repos/asf/cxf/diff/5a6a30fa
Branch: refs/heads/master
Commit: 5a6a30faa4164ea835221c9785156d372c215c5a
Parents: 4405382
Author: Sergey Beryozkin <sb...@gmail.com>
Authored: Mon Dec 19 12:13:08 2016 +0000
Committer: Sergey Beryozkin <sb...@gmail.com>
Committed: Mon Dec 19 12:13:08 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/5a6a30fa/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/5a6a30fa/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