Skip to content

Commit

Permalink
Merge branch 'wso2:master' into add-API-support-create-user-def-auth-…
Browse files Browse the repository at this point in the history
…local
  • Loading branch information
Thisara-Welmilla authored Dec 12, 2024
2 parents 3569c1b + fc9f8ad commit ba3a3b0
Show file tree
Hide file tree
Showing 153 changed files with 4,535 additions and 401 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
<parent>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.expired.password.identification</artifactId>
<version>1.2.258-SNAPSHOT</version>
<version>1.3.11-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.expired.password.identification</artifactId>
<version>1.2.258-SNAPSHOT</version>
<version>1.3.11-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>identity-api-server</artifactId>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<version>1.2.258-SNAPSHOT</version>
<version>1.3.11-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
<parent>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.idle.account.identification</artifactId>
<version>1.2.258-SNAPSHOT</version>
<version>1.3.11-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.idle.account.identification</artifactId>
<version>1.2.258-SNAPSHOT</version>
<version>1.3.11-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
<parent>
<artifactId>identity-api-server</artifactId>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<version>1.2.258-SNAPSHOT</version>
<version>1.3.11-SNAPSHOT</version>
<relativePath>../../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
<parent>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.server.action.management</artifactId>
<version>1.2.258-SNAPSHOT</version>
<version>1.3.11-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@

package org.wso2.carbon.identity.api.server.action.management.common;

import org.wso2.carbon.identity.action.management.ActionManagementService;
import org.wso2.carbon.identity.action.management.service.ActionManagementService;

/**
* Service holder class for action management.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@

import org.springframework.beans.factory.config.AbstractFactoryBean;
import org.wso2.carbon.context.PrivilegedCarbonContext;
import org.wso2.carbon.identity.action.management.ActionManagementService;
import org.wso2.carbon.identity.action.management.service.ActionManagementService;

/**
* Factory class for ActionManagementOSGiService.
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@
<parent>
<groupId>org.wso2.carbon.identity.server.api</groupId>
<artifactId>org.wso2.carbon.identity.api.server.action.management</artifactId>
<version>1.2.258-SNAPSHOT</version>
<version>1.3.11-SNAPSHOT</version>
<relativePath>../pom.xml</relativePath>
</parent>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,10 @@
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import org.wso2.carbon.identity.api.server.action.management.v1.ActionType;
import org.wso2.carbon.identity.api.server.action.management.v1.Link;
import javax.validation.constraints.*;


Expand Down Expand Up @@ -71,6 +74,8 @@ public static StatusEnum fromValue(String value) {
}

private StatusEnum status;
private List<Link> links = null;


/**
**/
Expand Down Expand Up @@ -162,7 +167,33 @@ public void setStatus(StatusEnum status) {
this.status = status;
}

/**
**/
public ActionBasicResponse links(List<Link> links) {

this.links = links;
return this;
}

@ApiModelProperty(example = "[{\"href\":\"/t/wso2.com/api/server/v1/actions/preIssueAccessToken/24f64d17-9824-4e28-8413-de45728d8e84\",\"method\":\"GET\",\"rel\":\"self\"}]", value = "")
@JsonProperty("links")
@Valid
public List<Link> getLinks() {
return links;
}
public void setLinks(List<Link> links) {
this.links = links;
}

public ActionBasicResponse addLinksItem(Link linksItem) {
if (this.links == null) {
this.links = new ArrayList<Link>();
}
this.links.add(linksItem);
return this;
}



@Override
public boolean equals(java.lang.Object o) {
Expand All @@ -178,12 +209,13 @@ public boolean equals(java.lang.Object o) {
Objects.equals(this.type, actionBasicResponse.type) &&
Objects.equals(this.name, actionBasicResponse.name) &&
Objects.equals(this.description, actionBasicResponse.description) &&
Objects.equals(this.status, actionBasicResponse.status);
Objects.equals(this.status, actionBasicResponse.status) &&
Objects.equals(this.links, actionBasicResponse.links);
}

@Override
public int hashCode() {
return Objects.hash(id, type, name, description, status);
return Objects.hash(id, type, name, description, status, links);
}

@Override
Expand All @@ -197,6 +229,7 @@ public String toString() {
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
sb.append(" status: ").append(toIndentedString(status)).append("\n");
sb.append(" links: ").append(toIndentedString(links)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -199,14 +199,14 @@ public Response getActionTypes() {
@Path("/{actionType}")

@Produces({ "application/json" })
@ApiOperation(value = "List action ", notes = "This API provides the capability to retrieve the action by action type.<br> <b>Scope required:</b> <br> * internal_action_mgt_view ", response = ActionResponse.class, responseContainer = "List", authorizations = {
@ApiOperation(value = "List action ", notes = "This API provides the capability to retrieve the action by action type.<br> <b>Scope required:</b> <br> * internal_action_mgt_view ", response = ActionBasicResponse.class, responseContainer = "List", authorizations = {
@Authorization(value = "BasicAuth"),
@Authorization(value = "OAuth2", scopes = {

})
}, tags={ "Actions", })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = ActionResponse.class, responseContainer = "List"),
@ApiResponse(code = 200, message = "OK", response = ActionBasicResponse.class, responseContainer = "List"),
@ApiResponse(code = 400, message = "Bad Request", response = Error.class),
@ApiResponse(code = 401, message = "Unauthorized", response = Void.class),
@ApiResponse(code = 403, message = "Forbidden", response = Void.class),
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,176 @@
/*
* Copyright (c) 2024, WSO2 LLC. (http://www.wso2.com).
*
* WSO2 LLC. 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.wso2.carbon.identity.api.server.action.management.v1;

import com.fasterxml.jackson.annotation.JsonProperty;
import com.fasterxml.jackson.annotation.JsonCreator;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import javax.validation.constraints.*;


import io.swagger.annotations.*;
import java.util.Objects;
import javax.validation.Valid;
import javax.xml.bind.annotation.*;

public class Link {

private String href;

@XmlType(name="MethodEnum")
@XmlEnum(String.class)
public enum MethodEnum {

@XmlEnumValue("GET") GET(String.valueOf("GET"));


private String value;

MethodEnum(String v) {
value = v;
}

public String value() {
return value;
}

@Override
public String toString() {
return String.valueOf(value);
}

public static MethodEnum fromValue(String value) {
for (MethodEnum b : MethodEnum.values()) {
if (b.value.equals(value)) {
return b;
}
}
throw new IllegalArgumentException("Unexpected value '" + value + "'");
}
}

private MethodEnum method;
private String rel;

/**
* Url of the endpoint.
**/
public Link href(String href) {

this.href = href;
return this;
}

@ApiModelProperty(value = "Url of the endpoint.")
@JsonProperty("href")
@Valid
public String getHref() {
return href;
}
public void setHref(String href) {
this.href = href;
}

/**
* Http method.
**/
public Link method(MethodEnum method) {

this.method = method;
return this;
}

@ApiModelProperty(value = "Http method.")
@JsonProperty("method")
@Valid
public MethodEnum getMethod() {
return method;
}
public void setMethod(MethodEnum method) {
this.method = method;
}

/**
* Relation to the resource.
**/
public Link rel(String rel) {

this.rel = rel;
return this;
}

@ApiModelProperty(value = "Relation to the resource.")
@JsonProperty("rel")
@Valid
public String getRel() {
return rel;
}
public void setRel(String rel) {
this.rel = rel;
}



@Override
public boolean equals(java.lang.Object o) {

if (this == o) {
return true;
}
if (o == null || getClass() != o.getClass()) {
return false;
}
Link link = (Link) o;
return Objects.equals(this.href, link.href) &&
Objects.equals(this.method, link.method) &&
Objects.equals(this.rel, link.rel);
}

@Override
public int hashCode() {
return Objects.hash(href, method, rel);
}

@Override
public String toString() {

StringBuilder sb = new StringBuilder();
sb.append("class Link {\n");

sb.append(" href: ").append(toIndentedString(href)).append("\n");
sb.append(" method: ").append(toIndentedString(method)).append("\n");
sb.append(" rel: ").append(toIndentedString(rel)).append("\n");
sb.append("}");
return sb.toString();
}

/**
* Convert the given object to string with each line indented by 4 spaces
* (except the first line).
*/
private String toIndentedString(java.lang.Object o) {

if (o == null) {
return "null";
}
return o.toString().replace("\n", "\n");
}
}

Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ private ActionMgtEndpointConstants() {

public static final String ACTION_MANAGEMENT_PREFIX = "ACTION-";
public static final String ACTION_PATH_COMPONENT = "/actions";
public static final String PATH_CONSTANT = "/";
public static final String PATH_SEPARATOR = "/";

/**
* Enum for error messages.
Expand Down
Loading

0 comments on commit ba3a3b0

Please sign in to comment.