forked from community/device-mgt-core
Add api to create identity server Return List of identity servers withtout extra bean for responsetemp
parent
986828bc16
commit
3dd0690552
@ -0,0 +1,94 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2022, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
|
||||||
|
*
|
||||||
|
* WSO2 Inc. 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 io.entgra.application.mgt.common.dto;
|
||||||
|
|
||||||
|
public class IdentityServerDTO {
|
||||||
|
private int id;
|
||||||
|
private String providerName;
|
||||||
|
private String name;
|
||||||
|
private String description;
|
||||||
|
private String url;
|
||||||
|
private String apiUrl;
|
||||||
|
private String userName;
|
||||||
|
private String password;
|
||||||
|
|
||||||
|
public int getId() {
|
||||||
|
return id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setId(int id) {
|
||||||
|
this.id = id;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getName() {
|
||||||
|
return name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setName(String name) {
|
||||||
|
this.name = name;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getDescription() {
|
||||||
|
return description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setDescription(String description) {
|
||||||
|
this.description = description;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUrl() {
|
||||||
|
return url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUrl(String url) {
|
||||||
|
this.url = url;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getPassword() {
|
||||||
|
return password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPassword(String password) {
|
||||||
|
this.password = password;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getUserName() {
|
||||||
|
return userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setUserName(String userName) {
|
||||||
|
this.userName = userName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getProviderName() {
|
||||||
|
return providerName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProviderName(String providerName) {
|
||||||
|
this.providerName = providerName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public String getApiUrl() {
|
||||||
|
return apiUrl;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setApiUrl(String apiUrl) {
|
||||||
|
this.apiUrl = apiUrl;
|
||||||
|
}
|
||||||
|
}
|
@ -0,0 +1,52 @@
|
|||||||
|
/*
|
||||||
|
* Copyright (c) 2019, Entgra (pvt) Ltd. (http://entgra.io) All Rights Reserved.
|
||||||
|
*
|
||||||
|
* Entgra (pvt) Ltd. 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 io.entgra.application.mgt.core.config;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlElement;
|
||||||
|
import javax.xml.bind.annotation.XmlElementWrapper;
|
||||||
|
import javax.xml.bind.annotation.XmlRootElement;
|
||||||
|
import java.util.List;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* Represents the Application Management Configuration.
|
||||||
|
*/
|
||||||
|
@XmlRootElement(name = "IdentityServerConfiguration")
|
||||||
|
public class IdentityServerConfiguration {
|
||||||
|
|
||||||
|
private List<IdentityServerDetail> identityServers;
|
||||||
|
|
||||||
|
@XmlElementWrapper(name = "IdentityServers")
|
||||||
|
@XmlElement(name = "IdentityServerDTO")
|
||||||
|
public List<IdentityServerDetail> getIdentityServers() {
|
||||||
|
return identityServers;
|
||||||
|
}
|
||||||
|
|
||||||
|
public IdentityServerDetail getIdentityServerDetailByProviderName(String identityServerProviderName) {
|
||||||
|
for (IdentityServerDetail identityServerDetail : identityServers) {
|
||||||
|
if (identityServerDetail.getProviderName().equals(identityServerProviderName)) {
|
||||||
|
return identityServerDetail;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setIdentityServers(List<IdentityServerDetail> identityServers) {
|
||||||
|
this.identityServers = identityServers;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
@ -0,0 +1,37 @@
|
|||||||
|
package io.entgra.application.mgt.core.config;
|
||||||
|
|
||||||
|
import javax.xml.bind.annotation.XmlAttribute;
|
||||||
|
|
||||||
|
public class IdentityServerDetail {
|
||||||
|
private String providerName;
|
||||||
|
private String serviceProvidersPageUri;
|
||||||
|
private String serviceProvidersAPIContextPath;
|
||||||
|
|
||||||
|
@XmlAttribute(name = "ProviderName")
|
||||||
|
public String getProviderName() {
|
||||||
|
return providerName;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setProviderName(String providerName) {
|
||||||
|
this.providerName = providerName;
|
||||||
|
}
|
||||||
|
|
||||||
|
|
||||||
|
@XmlAttribute(name = "ServiceProvidersPageUri")
|
||||||
|
public String getServiceProvidersPageUri() {
|
||||||
|
return serviceProvidersPageUri;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setServiceProvidersPageUri(String serviceProvidersPageUri) {
|
||||||
|
this.serviceProvidersPageUri = serviceProvidersPageUri;
|
||||||
|
}
|
||||||
|
|
||||||
|
@XmlAttribute(name = "ServiceProvidersAPIContextPath")
|
||||||
|
public String getServiceProvidersAPIContextPath() {
|
||||||
|
return serviceProvidersAPIContextPath;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setServiceProvidersAPIContextPath(String serviceProvidersAPIContextPath) {
|
||||||
|
this.serviceProvidersAPIContextPath = serviceProvidersAPIContextPath;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in new issue