From e1d3318aa036fabfe9c426fe57102b030a0653fc Mon Sep 17 00:00:00 2001 From: Thisara-Welmilla Date: Sun, 1 Dec 2024 21:13:53 +0530 Subject: [PATCH] Update APIs to support custom authentication management. --- .../common/AuthenticatorsServiceHolder.java | 2 +- .../authenticators/common/Constants.java | 5 +- .../authenticators/v1/AuthenticatorsApi.java | 50 +++++++++---------- .../v1/AuthenticatorsApiService.java | 4 +- .../v1/model/Authenticator.java | 22 ++++---- ...UserDefinedLocalAuthenticatorCreation.java | 23 ++++++++- .../ServerAuthenticatorManagementService.java | 9 ++-- ...ocalAuthenticatorConfigBuilderFactory.java | 10 ++-- .../src/main/resources/authenticators.yaml | 7 ++- 9 files changed, 79 insertions(+), 53 deletions(-) diff --git a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.common/src/main/java/org/wso2/carbon/identity/api/server/authenticators/common/AuthenticatorsServiceHolder.java b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.common/src/main/java/org/wso2/carbon/identity/api/server/authenticators/common/AuthenticatorsServiceHolder.java index 182617c54f..990b0fc18c 100644 --- a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.common/src/main/java/org/wso2/carbon/identity/api/server/authenticators/common/AuthenticatorsServiceHolder.java +++ b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.common/src/main/java/org/wso2/carbon/identity/api/server/authenticators/common/AuthenticatorsServiceHolder.java @@ -95,7 +95,7 @@ public ApplicationAuthenticatorService getApplicationAuthenticatorService() { * * @param applicationAuthenticatorService ApplicationAuthenticatorService. */ - public void setApplicationCommonService(ApplicationAuthenticatorService applicationAuthenticatorService) { + public void setApplicationAuthenticatorService(ApplicationAuthenticatorService applicationAuthenticatorService) { AuthenticatorsServiceHolder.getInstance().applicationAuthenticatorService = applicationAuthenticatorService; } diff --git a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.common/src/main/java/org/wso2/carbon/identity/api/server/authenticators/common/Constants.java b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.common/src/main/java/org/wso2/carbon/identity/api/server/authenticators/common/Constants.java index 72e1951032..f8ced2d174 100644 --- a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.common/src/main/java/org/wso2/carbon/identity/api/server/authenticators/common/Constants.java +++ b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.common/src/main/java/org/wso2/carbon/identity/api/server/authenticators/common/Constants.java @@ -28,6 +28,7 @@ private Constants() { public static final String AUTHENTICATOR_ERROR_PREFIX = "AUT-"; public static final String FEDERATED_AUTHENTICATORS = "federatedAuthenticators"; public static final String AUTHENTICATOR_PATH_COMPONENT = "/authenticators"; + public static final String CONFIGS_AUTHENTICATOR_PATH_COMPONENT = "/configs/authenticators"; public static final String PATH_SEPERATOR = "/"; public static final String PAGE_LINK_REL_NEXT = "next"; public static final String PAGE_LINK_REL_PREVIOUS = "previous"; @@ -70,8 +71,8 @@ public enum ErrorMessage { "Filter needs to be in the format ++. Eg: tag+eq+2FA"), ERROR_CODE_UNSUPPORTED_FILTER_ATTRIBUTE("60002", "Unsupported filter attribute.", "The filter attribute '%s' is not supported."), - ERROR_CODE_ENDPOINT_CONFIG("60003", "Unsupported filter attribute.", - "The filter attribute '%s' is not supported."), + ERROR_CODE_INVALID_ENDPOINT_CONFIG("60003", "Invalid endpoint configuration provided.", + "Invalid endpoint configuration is provided for the authenticator %s."), ERROR_CODE_ERROR_LISTING_AUTHENTICATORS("65001", "Unable to list the existing authenticators.", "Server encountered an error while listing the authenticators."), diff --git a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/gen/java/org/wso2/carbon/identity/api/server/authenticators/v1/AuthenticatorsApi.java b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/gen/java/org/wso2/carbon/identity/api/server/authenticators/v1/AuthenticatorsApi.java index 14764abc95..0f34ba83d8 100644 --- a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/gen/java/org/wso2/carbon/identity/api/server/authenticators/v1/AuthenticatorsApi.java +++ b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/gen/java/org/wso2/carbon/identity/api/server/authenticators/v1/AuthenticatorsApi.java @@ -44,6 +44,30 @@ public class AuthenticatorsApi { @Autowired private AuthenticatorsApiService delegate; + @Valid + @POST + @Path("/custom") + @Consumes({ "application/json" }) + @Produces({ "application/json" }) + @ApiOperation(value = "Create a new user defined local authenticator. ", notes = "This API provides the capability to create a new user defined local authenticator.
Permission required:
* /permission/admin/manage/custom_authenticator/create
Scope required:
* internal_custom_authenticator_create
", response = Authenticator.class, authorizations = { + @Authorization(value = "BasicAuth"), + @Authorization(value = "OAuth2", scopes = { + + }) + }, tags={ "User defined local authenticators", }) + @ApiResponses(value = { + @ApiResponse(code = 201, message = "Successful response", response = Authenticator.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 = 409, message = "Conflict", response = Error.class), + @ApiResponse(code = 500, message = "Server Error", response = Error.class) + }) + public Response addUserDefinedLocalAuthenticator(@ApiParam(value = "This represents the user defined local authenticator to be created." ,required=true) @Valid UserDefinedLocalAuthenticatorCreation userDefinedLocalAuthenticatorCreation) { + + return delegate.addUserDefinedLocalAuthenticator(userDefinedLocalAuthenticatorCreation ); + } + @Valid @GET @@ -93,30 +117,6 @@ public Response authenticatorsMetaTagsGet() { return delegate.authenticatorsMetaTagsGet(); } - @Valid - @POST - @Path("/custom") - @Consumes({ "application/json" }) - @Produces({ "application/json" }) - @ApiOperation(value = "Create a new user defined local authenticator. ", notes = "This API provides the capability to create a new user defined local authenticator.
Permission required:
* /permission/admin/manage/custom_authenticator/create
Scope required:
* internal_custom_authenticator_create
", response = Authenticator.class, authorizations = { - @Authorization(value = "BasicAuth"), - @Authorization(value = "OAuth2", scopes = { - - }) - }, tags={ "User defined local authenticators", }) - @ApiResponses(value = { - @ApiResponse(code = 201, message = "Successful response", response = Authenticator.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 = 409, message = "Conflict", response = Error.class), - @ApiResponse(code = 500, message = "Server Error", response = Error.class) - }) - public Response addUserDefinedLocalAuthenticator(@ApiParam(value = "This represents the user defined local authenticator to be created." ,required=true) @Valid UserDefinedLocalAuthenticatorCreation userDefinedLocalAuthenticatorCreation) { - - return delegate.addUserDefinedLocalAuthenticator(userDefinedLocalAuthenticatorCreation ); - } - @Valid @DELETE @Path("/custom/{authenticator-id}") @@ -166,7 +166,7 @@ public Response getConnectedAppsOfLocalAuthenticator(@ApiParam(value = "ID of an } @Valid - @PATCH + @PUT @Path("/custom/{authenticator-id}") @Consumes({ "application/json" }) @Produces({ "application/json" }) diff --git a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/gen/java/org/wso2/carbon/identity/api/server/authenticators/v1/AuthenticatorsApiService.java b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/gen/java/org/wso2/carbon/identity/api/server/authenticators/v1/AuthenticatorsApiService.java index 612e7799fb..145b8b45c0 100644 --- a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/gen/java/org/wso2/carbon/identity/api/server/authenticators/v1/AuthenticatorsApiService.java +++ b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/gen/java/org/wso2/carbon/identity/api/server/authenticators/v1/AuthenticatorsApiService.java @@ -32,12 +32,12 @@ public interface AuthenticatorsApiService { + public Response addUserDefinedLocalAuthenticator(UserDefinedLocalAuthenticatorCreation userDefinedLocalAuthenticatorCreation); + public Response authenticatorsGet(String filter, Integer limit, Integer offset); public Response authenticatorsMetaTagsGet(); - public Response addUserDefinedLocalAuthenticator(UserDefinedLocalAuthenticatorCreation userDefinedLocalAuthenticatorCreation); - public Response deleteUserDefinedLocalAuthenticator(String authenticatorId); public Response getConnectedAppsOfLocalAuthenticator(String authenticatorId, Integer limit, Integer offset); diff --git a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/gen/java/org/wso2/carbon/identity/api/server/authenticators/v1/model/Authenticator.java b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/gen/java/org/wso2/carbon/identity/api/server/authenticators/v1/model/Authenticator.java index 76fd698e31..e6730debb9 100644 --- a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/gen/java/org/wso2/carbon/identity/api/server/authenticators/v1/model/Authenticator.java +++ b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/gen/java/org/wso2/carbon/identity/api/server/authenticators/v1/model/Authenticator.java @@ -32,7 +32,7 @@ public class Authenticator { - private String id; + private String authenticatorId; private String name; private String displayName; private Boolean isEnabled; @@ -112,20 +112,20 @@ public static TypeEnum fromValue(String value) { /** **/ - public Authenticator id(String id) { + public Authenticator authenticatorId(String authenticatorId) { - this.id = id; + this.authenticatorId = authenticatorId; return this; } @ApiModelProperty(example = "QmFzaWNBdXRoZW50aWNhdG9y", value = "") - @JsonProperty("id") + @JsonProperty("authenticatorId") @Valid - public String getId() { - return id; + public String getAuthenticatorId() { + return authenticatorId; } - public void setId(String id) { - this.id = id; + public void setAuthenticatorId(String authenticatorId) { + this.authenticatorId = authenticatorId; } /** @@ -310,7 +310,7 @@ public boolean equals(java.lang.Object o) { return false; } Authenticator authenticator = (Authenticator) o; - return Objects.equals(this.id, authenticator.id) && + return Objects.equals(this.authenticatorId, authenticator.authenticatorId) && Objects.equals(this.name, authenticator.name) && Objects.equals(this.displayName, authenticator.displayName) && Objects.equals(this.isEnabled, authenticator.isEnabled) && @@ -324,7 +324,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(id, name, displayName, isEnabled, definedBy, type, image, description, tags, self); + return Objects.hash(authenticatorId, name, displayName, isEnabled, definedBy, type, image, description, tags, self); } @Override @@ -333,7 +333,7 @@ public String toString() { StringBuilder sb = new StringBuilder(); sb.append("class Authenticator {\n"); - sb.append(" id: ").append(toIndentedString(id)).append("\n"); + sb.append(" authenticatorId: ").append(toIndentedString(authenticatorId)).append("\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).append("\n"); diff --git a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/gen/java/org/wso2/carbon/identity/api/server/authenticators/v1/model/UserDefinedLocalAuthenticatorCreation.java b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/gen/java/org/wso2/carbon/identity/api/server/authenticators/v1/model/UserDefinedLocalAuthenticatorCreation.java index 2fc1903f56..1288cb5e36 100644 --- a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/gen/java/org/wso2/carbon/identity/api/server/authenticators/v1/model/UserDefinedLocalAuthenticatorCreation.java +++ b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/gen/java/org/wso2/carbon/identity/api/server/authenticators/v1/model/UserDefinedLocalAuthenticatorCreation.java @@ -37,6 +37,7 @@ public class UserDefinedLocalAuthenticatorCreation { private String name; + private String authenticatorId; private String displayName; private Boolean isEnabled; @@ -97,6 +98,24 @@ public void setName(String name) { this.name = name; } + /** + **/ + public UserDefinedLocalAuthenticatorCreation authenticatorId(String authenticatorId) { + + this.authenticatorId = authenticatorId; + return this; + } + + @ApiModelProperty(example = "Q3VzdG9tQXV0aGVudGljYXRvcg==", value = "") + @JsonProperty("authenticatorId") + @Valid + public String getAuthenticatorId() { + return authenticatorId; + } + public void setAuthenticatorId(String authenticatorId) { + this.authenticatorId = authenticatorId; + } + /** **/ public UserDefinedLocalAuthenticatorCreation displayName(String displayName) { @@ -224,6 +243,7 @@ public boolean equals(java.lang.Object o) { } UserDefinedLocalAuthenticatorCreation userDefinedLocalAuthenticatorCreation = (UserDefinedLocalAuthenticatorCreation) o; return Objects.equals(this.name, userDefinedLocalAuthenticatorCreation.name) && + Objects.equals(this.authenticatorId, userDefinedLocalAuthenticatorCreation.authenticatorId) && Objects.equals(this.displayName, userDefinedLocalAuthenticatorCreation.displayName) && Objects.equals(this.isEnabled, userDefinedLocalAuthenticatorCreation.isEnabled) && Objects.equals(this.authenticationType, userDefinedLocalAuthenticatorCreation.authenticationType) && @@ -234,7 +254,7 @@ public boolean equals(java.lang.Object o) { @Override public int hashCode() { - return Objects.hash(name, displayName, isEnabled, authenticationType, image, description, endpoint); + return Objects.hash(name, authenticatorId, displayName, isEnabled, authenticationType, image, description, endpoint); } @Override @@ -244,6 +264,7 @@ public String toString() { sb.append("class UserDefinedLocalAuthenticatorCreation {\n"); sb.append(" name: ").append(toIndentedString(name)).append("\n"); + sb.append(" authenticatorId: ").append(toIndentedString(authenticatorId)).append("\n"); sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n"); sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).append("\n"); sb.append(" authenticationType: ").append(toIndentedString(authenticationType)).append("\n"); diff --git a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/main/java/org/wso2/carbon/identity/api/server/authenticators/v1/core/ServerAuthenticatorManagementService.java b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/main/java/org/wso2/carbon/identity/api/server/authenticators/v1/core/ServerAuthenticatorManagementService.java index ce24888f69..bf02c9a760 100644 --- a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/main/java/org/wso2/carbon/identity/api/server/authenticators/v1/core/ServerAuthenticatorManagementService.java +++ b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/main/java/org/wso2/carbon/identity/api/server/authenticators/v1/core/ServerAuthenticatorManagementService.java @@ -48,7 +48,6 @@ import org.wso2.carbon.identity.application.common.model.LocalAuthenticatorConfig; import org.wso2.carbon.identity.application.common.model.RequestPathAuthenticatorConfig; import org.wso2.carbon.identity.application.common.model.UserDefinedLocalAuthenticatorConfig; -import org.wso2.carbon.identity.base.AuthenticatorPropertyConstants; import org.wso2.carbon.identity.base.AuthenticatorPropertyConstants.DefinedByType; import org.wso2.carbon.identity.base.IdentityException; import org.wso2.carbon.identity.core.model.ExpressionNode; @@ -214,8 +213,7 @@ public Authenticator addUserDefinedLocalAuthenticator( UserDefinedLocalAuthenticatorConfig createdConfig = AuthenticatorsServiceHolder.getInstance() .getApplicationAuthenticatorService().addUserDefinedLocalAuthenticator( LocalAuthenticatorConfigBuilderFactory.build(config), - AuthenticatorPropertyConstants.AuthenticationType.valueOf(config.getAuthenticationType() - .toString()), CarbonContext.getThreadLocalCarbonContext().getTenantDomain()); + CarbonContext.getThreadLocalCarbonContext().getTenantDomain()); return LocalAuthenticatorConfigBuilderFactory.build(createdConfig); } catch (AuthenticatorMgtException e) { throw handleAuthenticatorException(e, Constants.ErrorMessage @@ -231,8 +229,9 @@ public Authenticator addUserDefinedLocalAuthenticator( public void deleteUserDefinedLocalAuthenticator(String authenticatorId) { try { - AuthenticatorsServiceHolder.getInstance().getApplicationAuthenticatorService().deleteUserDefinedLocalAuthenticator( - authenticatorId, CarbonContext.getThreadLocalCarbonContext().getTenantDomain()); + AuthenticatorsServiceHolder.getInstance().getApplicationAuthenticatorService() + .deleteUserDefinedLocalAuthenticator(authenticatorId, + CarbonContext.getThreadLocalCarbonContext().getTenantDomain()); } catch (AuthenticatorMgtException e) { throw handleAuthenticatorException(e, Constants.ErrorMessage.ERROR_CODE_ERROR_RETRIEVING_IDP_CONNECTED_APPS, authenticatorId); diff --git a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/main/java/org/wso2/carbon/identity/api/server/authenticators/v1/impl/LocalAuthenticatorConfigBuilderFactory.java b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/main/java/org/wso2/carbon/identity/api/server/authenticators/v1/impl/LocalAuthenticatorConfigBuilderFactory.java index aacd5f1d58..aea96fad40 100644 --- a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/main/java/org/wso2/carbon/identity/api/server/authenticators/v1/impl/LocalAuthenticatorConfigBuilderFactory.java +++ b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/main/java/org/wso2/carbon/identity/api/server/authenticators/v1/impl/LocalAuthenticatorConfigBuilderFactory.java @@ -35,8 +35,8 @@ import java.util.NoSuchElementException; import java.util.stream.Collectors; -import static org.wso2.carbon.identity.api.server.authenticators.common.Constants.AUTHENTICATOR_PATH_COMPONENT; -import static org.wso2.carbon.identity.api.server.authenticators.common.Constants.ErrorMessage.ERROR_CODE_ENDPOINT_CONFIG; +import static org.wso2.carbon.identity.api.server.authenticators.common.Constants.CONFIGS_AUTHENTICATOR_PATH_COMPONENT; +import static org.wso2.carbon.identity.api.server.authenticators.common.Constants.ErrorMessage.ERROR_CODE_INVALID_ENDPOINT_CONFIG; import static org.wso2.carbon.identity.api.server.common.Constants.V1_API_PATH_COMPONENT; /** @@ -59,7 +59,7 @@ public static Authenticator build(UserDefinedLocalAuthenticatorConfig config) { authenticator.setDefinedBy(Authenticator.DefinedByEnum.USER); authenticator.setType(Authenticator.TypeEnum.LOCAL); authenticator.setSelf(ContextLoader.buildURIForBody(String.format(V1_API_PATH_COMPONENT + - AUTHENTICATOR_PATH_COMPONENT + "/%s", config.getName())).toString()); + CONFIGS_AUTHENTICATOR_PATH_COMPONENT + "/%s", config.getName())).toString()); return authenticator; } @@ -77,6 +77,8 @@ public static UserDefinedLocalAuthenticatorConfig build(UserDefinedLocalAuthenti UserDefinedLocalAuthenticatorConfig authConfig = new UserDefinedLocalAuthenticatorConfig( AuthenticatorPropertyConstants.AuthenticationType.valueOf( config.getAuthenticationType().toString())); + authConfig.setAuthenticationType(AuthenticatorPropertyConstants.AuthenticationType.valueOf( + config.getAuthenticationType().toString())); authConfig.setName(config.getName()); authConfig.setDisplayName(config.getDisplayName()); authConfig.setEnabled(config.getIsEnabled()); @@ -119,7 +121,7 @@ private static UserDefinedAuthenticatorEndpointConfig buildEndpointConfig(Endpoi Map.Entry::getKey, entry -> entry.getValue().toString()))); return endpointConfigBuilder.build(); } catch (NoSuchElementException e) { - Constants.ErrorMessage error = ERROR_CODE_ENDPOINT_CONFIG; + Constants.ErrorMessage error = ERROR_CODE_INVALID_ENDPOINT_CONFIG; throw new AuthenticatorMgtClientException(error.getCode(), error.getMessage(), error.getMessage()); } } diff --git a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/main/resources/authenticators.yaml b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/main/resources/authenticators.yaml index 3f2b9ad217..6e06cc0aea 100644 --- a/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/main/resources/authenticators.yaml +++ b/components/org.wso2.carbon.identity.api.server.authenticators/org.wso2.carbon.identity.api.server.authenticators.v1/src/main/resources/authenticators.yaml @@ -168,7 +168,7 @@ paths: description: This represents the user defined local authenticator to be created. required: true /authenticators/custom/{authenticator-id}: - patch: + put: tags: - User defined local authenticators summary: | @@ -338,7 +338,7 @@ components: Authenticator: type: object properties: - id: + authenticatorId: type: string example: QmFzaWNBdXRoZW50aWNhdG9y name: @@ -381,6 +381,9 @@ components: name: type: string example: CustomAuthenticator + authenticatorId: + type: string + example: Q3VzdG9tQXV0aGVudGljYXRvcg== displayName: type: string example: Custom auth