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

Set Api Based Authentication Flag #550

Merged
merged 3 commits into from
Dec 1, 2023
Merged

Set Api Based Authentication Flag #550

merged 3 commits into from
Dec 1, 2023

Conversation

DMHP
Copy link
Contributor

@DMHP DMHP commented Nov 30, 2023

Set Api Based Authentication Flag

@CLAassistant
Copy link

CLA assistant check
Thank you for your submission! We really appreciate it. Like many open source projects, we ask that you sign our Contributor License Agreement before we can accept your contribution.


Hasanthi Dissanayake seems not to be a GitHub user. You need a GitHub account to be able to sign the CLA. If you have already a GitHub account, please add the email address used for this commit to your account.
You have signed the CLA already but the status is still pending? Let us recheck it.

@@ -511,6 +512,9 @@ private Authenticator addLocalAuthenticator(LocalAuthenticatorConfig config) {
authenticator.setName(config.getName());
authenticator.setDisplayName(config.getDisplayName());
authenticator.setIsEnabled(config.isEnabled());
if (config.getProperties().length > 0 && IS_API_BASED_SUPPORTED.equals(config.getProperties()[0].getName())) {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

shall we add a null check here is there is any possibility of config.getProperties() being null

@@ -36,7 +37,7 @@ public class InboundAuthSAML2Config {

private List<String> destinationURLs = null;

private Integer metadataValidityPeriod;
private BigDecimal metadataValidityPeriod;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let remove this file from the commit. Seems like a previous editor of the api definition hasn't updated the gen code.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ThaminduDilshan has added this code. He will test the fix after merging the PR.

@@ -605,6 +607,11 @@ private List<AuthenticatorListItem> buildAuthenticatorListResponse(
authenticatorListItem.setName(config.getName());
authenticatorListItem.setDisplayName(config.getDisplayName());
authenticatorListItem.setIsEnabled(config.isEnabled());
if (config.getProperties().length > 0 && IS_API_BASED_SUPPORTED.equals
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Lets do null check here if there is any possibility of config.getProperties() getting null

@@ -1040,6 +1040,10 @@ components:
type: boolean
default: true
example: true
isAPIBasedAuthentication:
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Shall we change this to isAPIBasedAuthenticationSupported

@DMHP DMHP force-pushed the api branch 2 times, most recently from c9ce271 to c766e7f Compare November 30, 2023 18:28
@DMHP DMHP merged commit d08ff85 into wso2:master Dec 1, 2023
3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants