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

Revert "Set Api Based Authentication Flag" #553

Merged
merged 1 commit into from
Dec 1, 2023
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
@@ -1,20 +1,18 @@
/*
* Copyright (c) 2023, 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.
*/
* Copyright (c) 2021, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
*
* Licensed 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.authenticators.v1;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
/*
* Copyright (c) 2023, 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.
*/
* Copyright (c) 2021, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
*
* Licensed 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.authenticators.v1;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
/*
* Copyright (c) 2023, 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.
*/
* Copyright (c) 2021, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* Licensed 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.authenticators.v1.factories;

Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
/*
* Copyright (c) 2023, 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.
*/
* Copyright (c) 2021, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
*
* Licensed 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.authenticators.v1.model;

Expand All @@ -38,7 +36,6 @@ public class Authenticator {
private String name;
private String displayName;
private Boolean isEnabled;
private Boolean isAPIBasedAuthenticationSupported = false;

@XmlType(name="TypeEnum")
@XmlEnum(String.class)
Expand Down Expand Up @@ -151,24 +148,6 @@ public void setIsEnabled(Boolean isEnabled) {
this.isEnabled = isEnabled;
}

/**
**/
public Authenticator isAPIBasedAuthenticationSupported(Boolean isAPIBasedAuthenticationSupported) {

this.isAPIBasedAuthenticationSupported = isAPIBasedAuthenticationSupported;
return this;
}

@ApiModelProperty(example = "true", value = "")
@JsonProperty("isAPIBasedAuthenticationSupported")
@Valid
public Boolean getIsAPIBasedAuthenticationSupported() {
return isAPIBasedAuthenticationSupported;
}
public void setIsAPIBasedAuthenticationSupported(Boolean isAPIBasedAuthenticationSupported) {
this.isAPIBasedAuthenticationSupported = isAPIBasedAuthenticationSupported;
}

/**
**/
public Authenticator type(TypeEnum type) {
Expand Down Expand Up @@ -283,7 +262,6 @@ public boolean equals(java.lang.Object o) {
Objects.equals(this.name, authenticator.name) &&
Objects.equals(this.displayName, authenticator.displayName) &&
Objects.equals(this.isEnabled, authenticator.isEnabled) &&
Objects.equals(this.isAPIBasedAuthenticationSupported, authenticator.isAPIBasedAuthenticationSupported) &&
Objects.equals(this.type, authenticator.type) &&
Objects.equals(this.image, authenticator.image) &&
Objects.equals(this.description, authenticator.description) &&
Expand All @@ -293,7 +271,7 @@ public boolean equals(java.lang.Object o) {

@Override
public int hashCode() {
return Objects.hash(id, name, displayName, isEnabled, isAPIBasedAuthenticationSupported, type, image, description, tags, self);
return Objects.hash(id, name, displayName, isEnabled, type, image, description, tags, self);
}

@Override
Expand All @@ -306,7 +284,6 @@ public String toString() {
sb.append(" name: ").append(toIndentedString(name)).append("\n");
sb.append(" displayName: ").append(toIndentedString(displayName)).append("\n");
sb.append(" isEnabled: ").append(toIndentedString(isEnabled)).append("\n");
sb.append(" isAPIBasedAuthenticationSupported: ").append(toIndentedString(isAPIBasedAuthenticationSupported)).append("\n");
sb.append(" type: ").append(toIndentedString(type)).append("\n");
sb.append(" image: ").append(toIndentedString(image)).append("\n");
sb.append(" description: ").append(toIndentedString(description)).append("\n");
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ public ConnectedApp self(String self) {
return this;
}

@ApiModelProperty(example = "/t/org/api/server/v1/applications/c74d74b2-cb62-4abd-ad66-6c45daeb561c", value = "")
@ApiModelProperty(example = "connected-app-url", value = "")
@JsonProperty("self")
@Valid
public String getSelf() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,6 @@ public class ConnectedApps {
private Integer startIndex;
private Integer count;
private List<Link> links = null;

private List<ConnectedApp> connectedApps = null;


Expand Down Expand Up @@ -106,7 +105,7 @@ public ConnectedApps links(List<Link> links) {
return this;
}

@ApiModelProperty(example = "[{\"href\":\"authenticator/123e4567-e89b-12d3-a456-556642440000/connected-apps?offset=50&limit=10\",\"rel\":\"next\"},{\"href\":\"authenticator/provider/123e4567-e89b-12d3-a456-556642440000/connected-apps?offset=30&limit=10\",\"rel\":\"previous\"}]", value = "")
@ApiModelProperty(example = "[{\"href\":\"identity-provider/123e4567-e89b-12d3-a456-556642440000/connected-apps?offset=50&limit=10\",\"rel\":\"next\"},{\"href\":\"identity-provider/123e4567-e89b-12d3-a456-556642440000/connected-apps?offset=30&limit=10\",\"rel\":\"previous\"}]", value = "")
@JsonProperty("links")
@Valid
public List<Link> getLinks() {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
/*
* Copyright (c) 2023, 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.
*/
* Copyright (c) 2021, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
*
* Licensed 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.authenticators.v1.model;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public Link href(String href) {
return this;
}

@ApiModelProperty(example = "'/t/carbon.super/api/server/v1/authenticators/394b8adcce24c64a8a09a8d80abf8c337bd253de'", value = "Path to the target resource.")
@ApiModelProperty(example = "'/t/carbon.super/api/server/v1/identity-providers/394b8adcce24c64a8a09a8d80abf8c337bd253de'", value = "Path to the target resource.")
@JsonProperty("href")
@Valid
public String getHref() {
Expand All @@ -63,7 +63,7 @@ public Link rel(String rel) {
return this;
}

@ApiModelProperty(example = "authenticators", value = "Describes how the current context is related to the target resource.")
@ApiModelProperty(example = "identity-providers", value = "Describes how the current context is related to the target resource.")
@JsonProperty("rel")
@Valid
public String getRel() {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,6 @@
public class ServerAuthenticatorManagementService {

private static final Log log = LogFactory.getLog(ServerAuthenticatorManagementService.class);
private static final String IS_API_BASED_SUPPORTED = "IS_API_BASED_SUPPORTED";

/**
* Retrieves the list of available authenticators.
Expand Down Expand Up @@ -512,11 +511,6 @@ private Authenticator addLocalAuthenticator(LocalAuthenticatorConfig config) {
authenticator.setName(config.getName());
authenticator.setDisplayName(config.getDisplayName());
authenticator.setIsEnabled(config.isEnabled());
if (config.getProperties() != null && config.getProperties().length > 0 && IS_API_BASED_SUPPORTED.
equals(config.getProperties()[0].getName())) {
authenticator.setIsAPIBasedAuthenticationSupported
(Boolean.parseBoolean(config.getProperties()[0].getValue()));
}
authenticator.setType(Authenticator.TypeEnum.LOCAL);
String[] tags = config.getTags();
if (ArrayUtils.isNotEmpty(tags)) {
Expand Down
Original file line number Diff line number Diff line change
@@ -1,18 +1,18 @@
/*
* Copyright (c) 2021, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
*
* Licensed 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.
*/
* Copyright (c) 2021, WSO2 LLC. (http://www.wso2.org) All Rights Reserved.
*
* Licensed 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.authenticators.v1.impl;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -202,10 +202,6 @@ components:
isEnabled:
type: boolean
example: true
isAPIBasedAuthenticationSupported:
type: boolean
default: false
example: true
type:
type: string
enum:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,7 @@ public Response getRemoteLoggingConfigs() {
@Valid
@GET
@Path("/authentication/inbound/saml2")

@Produces({ "application/json" })
@ApiOperation(value = "Retrieve SAML2 inbound authentication configurations.", notes = "Retrieve server SAML2 inbound authentication configurations. ", response = InboundAuthSAML2Config.class, authorizations = {
@Authorization(value = "BasicAuth"),
Expand Down Expand Up @@ -573,7 +573,7 @@ public Response updateRemoteLoggingConfig(@ApiParam(value = "Log Type",required=
@Authorization(value = "OAuth2", scopes = {

})
}, tags={ "Server Remote Logging Configuration", })
}, tags={ "Server Remote Logging Configuration" })
@ApiResponses(value = {
@ApiResponse(code = 202, message = "Accepted", response = Void.class),
@ApiResponse(code = 400, message = "Bad Request", response = Error.class),
Expand Down Expand Up @@ -610,5 +610,4 @@ public Response updateSAMLInboundAuthConfig(@ApiParam(value = "" ) @Valid Inboun

return delegate.updateSAMLInboundAuthConfig(inboundAuthSAML2Config );
}

}
Original file line number Diff line number Diff line change
@@ -1,20 +1,18 @@
/*
* Copyright (c) 2023, 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.
*/
* Copyright (c) 2020, WSO2 Inc. (http://www.wso2.org) All Rights Reserved.
*
* Licensed 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.configs.v1.factories;

Expand Down
Loading
Loading