Skip to content

Commit

Permalink
Fix authentication flow with custom authentication extension.
Browse files Browse the repository at this point in the history
  • Loading branch information
Thisara-Welmilla committed Feb 2, 2025
1 parent b78d6ad commit 5a798ee
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@
*/
public class UserDefinedFederatedAuthenticatorConfig extends FederatedAuthenticatorConfig {

private UserDefinedAuthenticatorEndpointConfig endpointConfig;
private transient UserDefinedAuthenticatorEndpointConfig endpointConfig;

public UserDefinedFederatedAuthenticatorConfig() {

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@
import java.util.List;
import java.util.Map;

import static org.wso2.carbon.identity.application.authentication.framework.util.FrameworkConstants.BASIC_AUTH_MECHANISM;

/**
* Sequence Configuration loader, loads the sequence configuration from the database.
* <p>
Expand Down Expand Up @@ -317,7 +319,11 @@ private void loadStepAuthenticator(StepConfig stepConfig, IdentityProvider idp,
throw new FrameworkException("No authenticator found by the name: " + authenticatorName);
}
authenticatorConfig.setApplicationAuthenticator(appAuthenticatorForConfig);
stepConfig.getAuthenticatorList().add(authenticatorConfig);
if (BASIC_AUTH_MECHANISM.equals(authenticatorConfig.getApplicationAuthenticator().getAuthMechanism())) {
stepConfig.getAuthenticatorList().add(0, authenticatorConfig);
} else {
stepConfig.getAuthenticatorList().add(authenticatorConfig);
}
}

if (idp != null) {
Expand Down

0 comments on commit 5a798ee

Please sign in to comment.