You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@syncope.apache.org by mm...@apache.org on 2020/02/27 08:17:35 UTC
[syncope] 06/12: resume on auth modules; clean up to base essentials
This is an automated email from the ASF dual-hosted git repository.
mmoayyed pushed a commit to branch SYNCOPE-163-1
in repository https://gitbox.apache.org/repos/asf/syncope.git
commit 068d5a21f3765be7ee7587c10a6a41cb15bc7dfa
Author: Misagh Moayyed <mm...@gmail.com>
AuthorDate: Mon Feb 24 16:47:15 2020 +0330
resume on auth modules; clean up to base essentials
---
.../console/rest/ClientApplicationRestClient.java | 53 +++++++++
.../org/apache/syncope/common/lib/to/AnyTO.java | 3 +
.../syncope/common/lib/to/ClientApplicationTO.java | 106 +++++++++++++++++
.../common/lib/to/OpenIdConnectRelyingPartyTO.java | 108 ++++++++++++++++++
.../common/lib/to/SAML2ServiceProviderTO.java | 94 ++++++++++++++++
.../rest/api/service/ClientApplicationService.java | 125 +++++++++++++++++++++
.../core/logic/AbstractClientApplicationLogic.java | 25 +++++
.../AbstractClientApplicationServiceImpl.java | 66 +++++++++++
.../JPAOpenIdConnectRelyingParty.java | 30 ++---
9 files changed, 596 insertions(+), 14 deletions(-)
diff --git a/client/idrepo/console/src/main/java/org/apache/syncope/client/console/rest/ClientApplicationRestClient.java b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/rest/ClientApplicationRestClient.java
new file mode 100644
index 0000000..0dfb663
--- /dev/null
+++ b/client/idrepo/console/src/main/java/org/apache/syncope/client/console/rest/ClientApplicationRestClient.java
@@ -0,0 +1,53 @@
+/*
+ * 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.syncope.client.console.rest;
+
+import org.apache.syncope.common.lib.to.ApplicationTO;
+import org.apache.syncope.common.rest.api.service.ClientApplicationService;
+
+import java.util.List;
+
+/**
+ * Console client for invoking Rest Client Application's services.
+ */
+public class ClientApplicationRestClient extends BaseRestClient {
+
+ private static final long serialVersionUID = -3161863874876938094L;
+
+ public static void delete(final String key) {
+ getService(ClientApplicationService.class).delete(key);
+ }
+
+ public static ApplicationTO read(final String key) {
+ return getService(ClientApplicationService.class).read(key);
+ }
+
+ public static void update(final ApplicationTO applicationTO) {
+ getService(ClientApplicationService.class).update(applicationTO);
+ }
+
+ public static void create(final ApplicationTO applicationTO) {
+ getService(ClientApplicationService.class).create(applicationTO);
+ }
+
+ public static List<ApplicationTO> list() {
+ return getService(ClientApplicationService.class).list();
+ }
+
+}
diff --git a/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/AnyTO.java b/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/AnyTO.java
index 662c601..7d0c740 100644
--- a/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/AnyTO.java
+++ b/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/AnyTO.java
@@ -71,6 +71,9 @@ public abstract class AnyTO extends AbstractAnnotatedBean implements EntityTO, R
private final Set<String> resources = new HashSet<>();
+ protected AnyTO() {
+ }
+
@Schema(name = "@class", required = true)
public abstract String getDiscriminator();
diff --git a/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/ClientApplicationTO.java b/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/ClientApplicationTO.java
new file mode 100644
index 0000000..aa3421d
--- /dev/null
+++ b/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/ClientApplicationTO.java
@@ -0,0 +1,106 @@
+/*
+ * 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.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonPropertyOrder;
+import com.fasterxml.jackson.annotation.JsonTypeInfo;
+import io.swagger.v3.oas.annotations.media.Schema;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+import org.apache.syncope.common.lib.BaseBean;
+
+import javax.xml.bind.annotation.XmlSeeAlso;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlType
+@XmlSeeAlso({OpenIdConnectRelyingPartyTO.class, SAML2ServiceProviderTO.class})
+@JsonTypeInfo(use = JsonTypeInfo.Id.CLASS, include = JsonTypeInfo.As.EXISTING_PROPERTY, property = "@class")
+@JsonPropertyOrder(value = {"@class", "key", "name", "description"})
+@Schema(subTypes = {OpenIdConnectRelyingPartyTO.class, SAML2ServiceProviderTO.class}, discriminatorProperty = "@class")
+public abstract class ClientApplicationTO extends BaseBean implements EntityTO {
+
+ private static final long serialVersionUID = 6577639976115661357L;
+
+ private String key;
+
+ private String name;
+
+ private String description;
+
+ @Override
+ public String getKey() {
+ return key;
+ }
+
+ @Override
+ public void setKey(final String key) {
+ this.key = key;
+ }
+
+ public String getName() {
+ return name;
+ }
+
+ public void setName(final String name) {
+ this.name = name;
+ }
+
+ public String getDescription() {
+ return description;
+ }
+
+ public void setDescription(final String description) {
+ this.description = description;
+ }
+
+ @Schema(name = "@class", required = true)
+ public abstract String getDiscriminator();
+
+
+ @Override
+ public boolean equals(Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (obj == this) {
+ return true;
+ }
+ if (obj.getClass() != getClass()) {
+ return false;
+ }
+ ClientApplicationTO rhs = (ClientApplicationTO) obj;
+ return new EqualsBuilder()
+ .appendSuper(super.equals(obj))
+ .append(this.key, rhs.key)
+ .append(this.name, rhs.name)
+ .append(this.description, rhs.description)
+ .isEquals();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder()
+ .appendSuper(super.hashCode())
+ .append(key)
+ .append(name)
+ .append(description)
+ .toHashCode();
+ }
+}
diff --git a/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/OpenIdConnectRelyingPartyTO.java b/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/OpenIdConnectRelyingPartyTO.java
new file mode 100644
index 0000000..a8c5ec1
--- /dev/null
+++ b/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/OpenIdConnectRelyingPartyTO.java
@@ -0,0 +1,108 @@
+/*
+ * 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.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@XmlRootElement(name = "openIdConnectRelyingParty")
+@XmlType
+@Schema(allOf = { ClientApplicationTO.class })
+public class OpenIdConnectRelyingPartyTO extends ClientApplicationTO {
+ private static final long serialVersionUID = -6370888503924521351L;
+
+ private String clientId;
+
+ private String clientSecret;
+
+ private List<String> redirectUris = new ArrayList<>();
+
+ @XmlTransient
+ @JsonProperty("@class")
+ @Schema(name = "@class", required = true, example = "org.apache.syncope.common.lib.to.OpenIdConnectRelyingPartyTO")
+ @Override
+ public String getDiscriminator() {
+ return getClass().getName();
+ }
+
+ public String getClientId() {
+ return clientId;
+ }
+
+ public void setClientId(final String clientId) {
+ this.clientId = clientId;
+ }
+
+ public String getClientSecret() {
+ return clientSecret;
+ }
+
+ public void setClientSecret(final String clientSecret) {
+ this.clientSecret = clientSecret;
+ }
+
+ public List<String> getRedirectUris() {
+ return redirectUris;
+ }
+
+ public void setRedirectUris(final List<String> redirectUris) {
+ this.redirectUris = redirectUris;
+ }
+
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (obj == this) {
+ return true;
+ }
+ if (obj.getClass() != getClass()) {
+ return false;
+ }
+ OpenIdConnectRelyingPartyTO rhs = (OpenIdConnectRelyingPartyTO) obj;
+ return new EqualsBuilder()
+ .appendSuper(super.equals(obj))
+ .append(this.clientId, rhs.clientId)
+ .append(this.clientSecret, rhs.clientSecret)
+ .append(this.redirectUris, rhs.redirectUris)
+ .isEquals();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder()
+ .appendSuper(super.hashCode())
+ .append(clientId)
+ .append(clientSecret)
+ .append(redirectUris)
+ .toHashCode();
+ }
+}
diff --git a/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/SAML2ServiceProviderTO.java b/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/SAML2ServiceProviderTO.java
new file mode 100644
index 0000000..82c886b
--- /dev/null
+++ b/common/idrepo/lib/src/main/java/org/apache/syncope/common/lib/to/SAML2ServiceProviderTO.java
@@ -0,0 +1,94 @@
+/*
+ * 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.syncope.common.lib.to;
+
+import com.fasterxml.jackson.annotation.JsonProperty;
+import io.swagger.v3.oas.annotations.media.Schema;
+import org.apache.commons.lang3.builder.EqualsBuilder;
+import org.apache.commons.lang3.builder.HashCodeBuilder;
+
+import javax.xml.bind.annotation.XmlRootElement;
+import javax.xml.bind.annotation.XmlTransient;
+import javax.xml.bind.annotation.XmlType;
+
+@XmlRootElement(name = "saml2ServiceProvider")
+@XmlType
+@Schema(allOf = { ClientApplicationTO.class })
+public class SAML2ServiceProviderTO extends ClientApplicationTO {
+ private static final long serialVersionUID = -6370888503924521351L;
+
+ private String entityId;
+
+ private String metadataLocation;
+
+ @XmlTransient
+ @JsonProperty("@class")
+ @Schema(name = "@class", required = true, example = "org.apache.syncope.common.lib.to.SAML2ServiceProviderTO")
+ @Override
+ public String getDiscriminator() {
+ return getClass().getName();
+ }
+
+ public String getEntityId() {
+ return entityId;
+ }
+
+ public void setEntityId(final String entityId) {
+ this.entityId = entityId;
+ }
+
+ public String getMetadataLocation() {
+ return metadataLocation;
+ }
+
+ public void setMetadataLocation(final String metadataLocation) {
+ this.metadataLocation = metadataLocation;
+ }
+
+
+ @Override
+ public boolean equals(final Object obj) {
+ if (obj == null) {
+ return false;
+ }
+ if (obj == this) {
+ return true;
+ }
+ if (obj.getClass() != getClass()) {
+ return false;
+ }
+ SAML2ServiceProviderTO rhs = (SAML2ServiceProviderTO) obj;
+ return new EqualsBuilder()
+ .appendSuper(super.equals(obj))
+ .append(this.entityId, rhs.entityId)
+ .append(this.metadataLocation, rhs.metadataLocation)
+ .isEquals();
+ }
+
+ @Override
+ public int hashCode() {
+ return new HashCodeBuilder()
+ .appendSuper(super.hashCode())
+ .append(entityId)
+ .append(metadataLocation)
+ .toHashCode();
+ }
+}
+
diff --git a/common/idrepo/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ClientApplicationService.java b/common/idrepo/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ClientApplicationService.java
new file mode 100644
index 0000000..a90740d
--- /dev/null
+++ b/common/idrepo/rest-api/src/main/java/org/apache/syncope/common/rest/api/service/ClientApplicationService.java
@@ -0,0 +1,125 @@
+/*
+ * 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.syncope.common.rest.api.service;
+
+import io.swagger.v3.oas.annotations.Parameter;
+import io.swagger.v3.oas.annotations.enums.ParameterIn;
+import io.swagger.v3.oas.annotations.headers.Header;
+import io.swagger.v3.oas.annotations.media.Schema;
+import io.swagger.v3.oas.annotations.responses.ApiResponse;
+import io.swagger.v3.oas.annotations.responses.ApiResponses;
+import io.swagger.v3.oas.annotations.security.SecurityRequirement;
+import io.swagger.v3.oas.annotations.security.SecurityRequirements;
+import io.swagger.v3.oas.annotations.tags.Tag;
+import org.apache.syncope.common.lib.to.ClientApplicationTO;
+import org.apache.syncope.common.rest.api.RESTHeaders;
+
+import javax.validation.constraints.NotNull;
+import javax.ws.rs.Consumes;
+import javax.ws.rs.DELETE;
+import javax.ws.rs.GET;
+import javax.ws.rs.POST;
+import javax.ws.rs.PUT;
+import javax.ws.rs.Path;
+import javax.ws.rs.PathParam;
+import javax.ws.rs.Produces;
+import javax.ws.rs.core.HttpHeaders;
+import javax.ws.rs.core.MediaType;
+import javax.ws.rs.core.Response;
+
+import java.util.List;
+
+/**
+ * REST operations for applications.
+ */
+@Tag(name = "ClientApplications")
+@SecurityRequirements({
+ @SecurityRequirement(name = "BasicAuthentication"),
+ @SecurityRequirement(name = "Bearer")})
+@Path("clientApplications")
+public interface ClientApplicationService extends JAXRSService {
+
+ /**
+ * Returns a list of all applications.
+ *
+ * @return list of all applications.
+ */
+ @GET
+ @Produces({ MediaType.APPLICATION_JSON, RESTHeaders.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ List<ClientApplicationTO> list();
+
+ /**
+ * Returns application with matching key.
+ *
+ * @param key application key to be read
+ * @return application with matching key
+ */
+ @GET
+ @Path("{key}")
+ @Produces({ MediaType.APPLICATION_JSON, RESTHeaders.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ ClientApplicationTO read(@NotNull @PathParam("key") String key);
+
+ /**
+ * Creates a new application.
+ *
+ * @param applicationTO application to be created
+ * @return Response object featuring Location header of created application
+ */
+ @ApiResponses(
+ @ApiResponse(responseCode = "201",
+ description = "Application successfully created", headers = {
+ @Header(name = RESTHeaders.RESOURCE_KEY, schema =
+ @Schema(type = "string"),
+ description = "Key value for the entity created"),
+ @Header(name = HttpHeaders.LOCATION, schema =
+ @Schema(type = "string"),
+ description = "URL of the entity created") }))
+ @POST
+ @Consumes({ MediaType.APPLICATION_JSON, RESTHeaders.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, RESTHeaders.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ Response create(@NotNull ClientApplicationTO applicationTO);
+
+ /**
+ * Updates the application matching the provided key.
+ *
+ * @param applicationTO application to be stored
+ */
+ @Parameter(name = "key", description = "Application's key", in = ParameterIn.PATH, schema =
+ @Schema(type = "string"))
+ @ApiResponses(
+ @ApiResponse(responseCode = "204", description = "Operation was successful"))
+ @PUT
+ @Path("{key}")
+ @Consumes({ MediaType.APPLICATION_JSON, RESTHeaders.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ @Produces({ MediaType.APPLICATION_JSON, RESTHeaders.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ void update(@NotNull ClientApplicationTO applicationTO);
+
+ /**
+ * Deletes the application matching the provided key.
+ *
+ * @param key application key to be deleted
+ */
+ @ApiResponses(
+ @ApiResponse(responseCode = "204", description = "Operation was successful"))
+ @DELETE
+ @Path("{key}")
+ @Produces({ MediaType.APPLICATION_JSON, RESTHeaders.APPLICATION_YAML, MediaType.APPLICATION_XML })
+ void delete(@NotNull @PathParam("key") String key);
+}
diff --git a/core/idrepo/logic/src/main/java/org/apache/syncope/core/logic/AbstractClientApplicationLogic.java b/core/idrepo/logic/src/main/java/org/apache/syncope/core/logic/AbstractClientApplicationLogic.java
new file mode 100644
index 0000000..79ccf62
--- /dev/null
+++ b/core/idrepo/logic/src/main/java/org/apache/syncope/core/logic/AbstractClientApplicationLogic.java
@@ -0,0 +1,25 @@
+/*
+ * 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.syncope.core.logic;
+
+import org.apache.syncope.common.lib.to.DynRealmTO;
+
+public abstract class AbstractClientApplicationLogic extends AbstractTransactionalLogic<DynRealmTO> {
+}
diff --git a/core/idrepo/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractClientApplicationServiceImpl.java b/core/idrepo/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractClientApplicationServiceImpl.java
new file mode 100644
index 0000000..f7c4295
--- /dev/null
+++ b/core/idrepo/rest-cxf/src/main/java/org/apache/syncope/core/rest/cxf/service/AbstractClientApplicationServiceImpl.java
@@ -0,0 +1,66 @@
+/*
+ * 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.syncope.core.rest.cxf.service;
+
+import org.apache.syncope.common.lib.to.ClientApplicationTO;
+import org.apache.syncope.common.rest.api.RESTHeaders;
+import org.apache.syncope.common.rest.api.service.ClientApplicationService;
+import org.apache.syncope.core.logic.AbstractClientApplicationLogic;
+
+import javax.ws.rs.core.Response;
+
+import java.net.URI;
+import java.util.List;
+
+public abstract class AbstractClientApplicationServiceImpl extends AbstractServiceImpl
+ implements ClientApplicationService {
+
+ protected abstract AbstractClientApplicationLogic getLogic();
+
+ @Override
+ public List<ClientApplicationTO> list() {
+ return getLogic().list();
+ }
+
+ @Override
+ public ClientApplicationTO read(final String key) {
+ return getLogic().read(key);
+ }
+
+
+ @Override
+ public Response create(final ClientApplicationTO applicationTO) {
+ ClientApplicationTO created = getLogic().create(applicationTO);
+ URI location = uriInfo.getAbsolutePathBuilder().path(created.getKey()).build();
+ return Response.created(location).
+ header(RESTHeaders.RESOURCE_KEY, created.getKey()).
+ build();
+ }
+
+ @Override
+ public void update(final ClientApplicationTO applicationTO) {
+ getLogic().update(applicationTO);
+ }
+
+ @Override
+ public void delete(final String key) {
+ getLogic().delete(key);
+ }
+
+}
diff --git a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/authentication/JPAOpenIdConnectRelyingParty.java b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/authentication/JPAOpenIdConnectRelyingParty.java
index 6acd0ea..f07984d 100644
--- a/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/authentication/JPAOpenIdConnectRelyingParty.java
+++ b/core/persistence-jpa/src/main/java/org/apache/syncope/core/persistence/jpa/entity/authentication/JPAOpenIdConnectRelyingParty.java
@@ -61,31 +61,39 @@ public class JPAOpenIdConnectRelyingParty extends AbstractGeneratedKeyEntity imp
@Override
public String getName() {
return name;
- } @Override
- public List<String> getRedirectUris() {
- return redirectUris;
}
@Override
public void setName(final String name) {
this.name = name;
} @Override
- public void setRedirectUris(final List<String> redirectUris) {
- this.redirectUris = redirectUris;
+ public List<String> getRedirectUris() {
+ return redirectUris;
}
@Override
public String getDescription() {
return description;
- } @Override
- public String getClientId() {
- return clientId;
}
@Override
public void setDescription(final String description) {
this.description = description;
} @Override
+ public void setRedirectUris(final List<String> redirectUris) {
+ this.redirectUris = redirectUris;
+ }
+
+
+
+ @Override
+ public String getClientId() {
+ return clientId;
+ }
+
+
+
+ @Override
public void setClientId(final String clientId) {
this.clientId = clientId;
}
@@ -101,11 +109,5 @@ public class JPAOpenIdConnectRelyingParty extends AbstractGeneratedKeyEntity imp
}
-
-
-
-
-
-
}