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
  • Loading branch information
Thisara-Welmilla authored Dec 19, 2024
2 parents 8314e4c + 8376330 commit 161674d
Show file tree
Hide file tree
Showing 175 changed files with 6,098 additions and 676 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.253-SNAPSHOT</version>
<version>1.3.16-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.253-SNAPSHOT</version>
<version>1.3.16-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.253-SNAPSHOT</version>
<version>1.3.16-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.253-SNAPSHOT</version>
<version>1.3.16-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.253-SNAPSHOT</version>
<version>1.3.16-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.253-SNAPSHOT</version>
<version>1.3.16-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.253-SNAPSHOT</version>
<version>1.3.16-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.253-SNAPSHOT</version>
<version>1.3.16-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 @@ -29,7 +29,6 @@
import org.wso2.carbon.identity.api.server.action.management.v1.ActionResponse;
import org.wso2.carbon.identity.api.server.action.management.v1.ActionTypesResponseItem;
import org.wso2.carbon.identity.api.server.action.management.v1.ActionUpdateModel;
import org.wso2.carbon.identity.api.server.action.management.v1.AuthenticationTypeProperties;
import org.wso2.carbon.identity.api.server.action.management.v1.Error;
import org.wso2.carbon.identity.api.server.action.management.v1.ActionsApiService;

Expand Down Expand Up @@ -200,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 All @@ -230,7 +229,7 @@ public Response getActionsByActionType(@ApiParam(value = "Name of the Action Typ
@Authorization(value = "OAuth2", scopes = {

})
}, tags={ "Actions", })
}, tags={ "Actions" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = ActionResponse.class),
@ApiResponse(code = 400, message = "Bad Request", response = Error.class),
Expand All @@ -244,28 +243,4 @@ public Response updateAction(@ApiParam(value = "Name of the Action Type.",requir
return delegate.updateAction(actionType, actionId, actionUpdateModel );
}

@Valid
@PUT
@Path("/{actionType}/{actionId}/{authType}")
@Consumes({ "application/json" })
@Produces({ "application/json" })
@ApiOperation(value = "Update Action endpoint authentication information by given Id. ", notes = "This API provides the capability to update Action endpoint authentication information by given Id. <br> <b>Scope required:</b> <br> * internal_action_mgt_update ", response = ActionResponse.class, authorizations = {
@Authorization(value = "BasicAuth"),
@Authorization(value = "OAuth2", scopes = {

})
}, tags={ "Actions" })
@ApiResponses(value = {
@ApiResponse(code = 200, message = "OK", response = ActionResponse.class),
@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),
@ApiResponse(code = 404, message = "Not Found", response = Error.class),
@ApiResponse(code = 500, message = "Server Error", response = Error.class)
})
public Response updateActionEndpointAuthentication(@ApiParam(value = "Name of the Action Type.",required=true, allowableValues="preIssueAccessToken, preUpdatePassword, preUpdateProfile, preRegistration") @PathParam("actionType") String actionType, @ApiParam(value = "Id of the Action.",required=true) @PathParam("actionId") String actionId, @ApiParam(value = "Authentication Type of the Action Endpoint.",required=true, allowableValues="none, basic, apiKey, bearer") @PathParam("authType") String authType, @ApiParam(value = "This represents the action endpoint authentication to be updated." ,required=true) @Valid AuthenticationTypeProperties authenticationTypeProperties) {

return delegate.updateActionEndpointAuthentication(actionType, actionId, authType, authenticationTypeProperties );
}

}
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,6 @@
import org.wso2.carbon.identity.api.server.action.management.v1.ActionResponse;
import org.wso2.carbon.identity.api.server.action.management.v1.ActionTypesResponseItem;
import org.wso2.carbon.identity.api.server.action.management.v1.ActionUpdateModel;
import org.wso2.carbon.identity.api.server.action.management.v1.AuthenticationTypeProperties;
import org.wso2.carbon.identity.api.server.action.management.v1.Error;
import javax.ws.rs.core.Response;

Expand All @@ -51,6 +50,4 @@ public interface ActionsApiService {
public Response getActionsByActionType(String actionType);

public Response updateAction(String actionType, String actionId, ActionUpdateModel actionUpdateModel);

public Response updateActionEndpointAuthentication(String actionType, String actionId, String authType, AuthenticationTypeProperties authenticationTypeProperties);
}
Loading

0 comments on commit 161674d

Please sign in to comment.