Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix endpointConfig being list. #820

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -112,8 +112,7 @@ public static TypeEnum fromValue(String value) {

private List<AuthenticatorProperty> properties = null;

private List<Endpoint> endpoint = null;

private Endpoint endpoint;

/**
**/
Expand Down Expand Up @@ -317,7 +316,7 @@ public Authenticator addPropertiesItem(AuthenticatorProperty propertiesItem) {

/**
**/
public Authenticator endpoint(List<Endpoint> endpoint) {
public Authenticator endpoint(Endpoint endpoint) {

this.endpoint = endpoint;
return this;
Expand All @@ -326,22 +325,14 @@ public Authenticator endpoint(List<Endpoint> endpoint) {
@ApiModelProperty(value = "")
@JsonProperty("endpoint")
@Valid
public List<Endpoint> getEndpoint() {
public Endpoint getEndpoint() {
return endpoint;
}
public void setEndpoint(List<Endpoint> endpoint) {
public void setEndpoint(Endpoint endpoint) {
this.endpoint = endpoint;
}

public Authenticator addEndpointItem(Endpoint endpointItem) {
if (this.endpoint == null) {
this.endpoint = new ArrayList<>();
}
this.endpoint.add(endpointItem);
return this;
}



@Override
public boolean equals(java.lang.Object o) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -848,7 +848,7 @@ private void resolveEndpointConfigurationForAuthenticatorFromConfig(
UserDefinedAuthenticatorEndpointConfig endpointConfig = config.getEndpointConfig();
Endpoint endpoint = new Endpoint();
endpoint.setUri(endpointConfig.getAuthenticatorEndpointUri());
authenticator.addEndpointItem(endpoint);
authenticator.endpoint(endpoint);
}

private void setAuthenticatorProperties(LocalAuthenticatorConfig config, Authenticator authenticator) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -1255,8 +1255,6 @@ components:
items:
$ref: '#/components/schemas/AuthenticatorProperty'
endpoint:
type: array
items:
$ref: '#/components/schemas/Endpoint'
required:
- name
Expand Down
Loading