Skip to content

Commit

Permalink
Update APIs to support custom authentication management.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thisara-Welmilla committed Nov 12, 2024
1 parent cfc2832 commit 88ce34f
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 26 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,6 @@
import io.swagger.annotations.ApiModelProperty;
import java.util.ArrayList;
import java.util.List;
import org.wso2.carbon.identity.api.server.idp.v1.model.Endpoint;
import org.wso2.carbon.identity.api.server.idp.v1.model.MetaProperty;
import javax.validation.constraints.*;

Expand Down Expand Up @@ -75,7 +74,6 @@ public static DefinedByEnum fromValue(String value) {

private List<MetaProperty> properties = null;

private Endpoint endpoint;

/**
**/
Expand Down Expand Up @@ -201,25 +199,7 @@ public MetaFederatedAuthenticator addPropertiesItem(MetaProperty propertiesItem)
return this;
}

/**
**/
public MetaFederatedAuthenticator endpoint(Endpoint endpoint) {

this.endpoint = endpoint;
return this;
}

@ApiModelProperty(value = "")
@JsonProperty("endpoint")
@Valid
public Endpoint getEndpoint() {
return endpoint;
}
public void setEndpoint(Endpoint endpoint) {
this.endpoint = endpoint;
}



@Override
public boolean equals(java.lang.Object o) {
Expand All @@ -236,13 +216,12 @@ public boolean equals(java.lang.Object o) {
Objects.equals(this.displayName, metaFederatedAuthenticator.displayName) &&
Objects.equals(this.definedBy, metaFederatedAuthenticator.definedBy) &&
Objects.equals(this.tags, metaFederatedAuthenticator.tags) &&
Objects.equals(this.properties, metaFederatedAuthenticator.properties) &&
Objects.equals(this.endpoint, metaFederatedAuthenticator.endpoint);
Objects.equals(this.properties, metaFederatedAuthenticator.properties);
}

@Override
public int hashCode() {
return Objects.hash(authenticatorId, name, displayName, definedBy, tags, properties, endpoint);
return Objects.hash(authenticatorId, name, displayName, definedBy, tags, properties);
}

@Override
Expand All @@ -257,7 +236,6 @@ public String toString() {
sb.append(" definedBy: ").append(toIndentedString(definedBy)).append("\n");
sb.append(" tags: ").append(toIndentedString(tags)).append("\n");
sb.append(" properties: ").append(toIndentedString(properties)).append("\n");
sb.append(" endpoint: ").append(toIndentedString(endpoint)).append("\n");
sb.append("}");
return sb.toString();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1699,6 +1699,7 @@ private MetaFederatedAuthenticatorListItem createMetaFederatedAuthenticatorListI
String authenticatorId = base64URLEncode(authenticatorConfig.getName());
metaFederatedAuthenticator.setName(authenticatorConfig.getName());
metaFederatedAuthenticator.setAuthenticatorId(authenticatorId);
metaFederatedAuthenticator.setDefinedBy(MetaFederatedAuthenticatorListItem.DefinedByEnum.SYSTEM);
FederatedAuthenticatorConfig federatedAuthenticatorConfig = ApplicationAuthenticatorService.getInstance()
.getFederatedAuthenticatorByName(authenticatorConfig.getName());
if (federatedAuthenticatorConfig != null) {
Expand Down Expand Up @@ -1727,6 +1728,7 @@ private MetaFederatedAuthenticator createMetaFederatedAuthenticator(FederatedAut
metaFederatedAuthenticator.setTags(Arrays.asList(tags));
}
}
metaFederatedAuthenticator.setDefinedBy(MetaFederatedAuthenticator.DefinedByEnum.SYSTEM);
Property[] properties = authenticatorConfig.getProperties();
List<MetaProperty> metaProperties = Arrays.stream(properties).map(propertyToExternalMeta).collect(Collectors
.toList());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2824,8 +2824,6 @@ components:
type: array
items:
$ref: '#/components/schemas/MetaProperty'
endpoint:
$ref: '#/components/schemas/Endpoint'
FederatedAuthenticatorRequest:
type: object
required:
Expand Down

0 comments on commit 88ce34f

Please sign in to comment.