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

CompareAuthenticationHandler skips entry resolution; wrong result code? #197

Closed
mmoayyed opened this issue May 5, 2021 · 1 comment
Closed

Comments

@mmoayyed
Copy link
Contributor

mmoayyed commented May 5, 2021

When using CompareAuthenticationHandler, successful authentication attempts return the following:

return new AuthenticationHandlerResponse(compareResponse, compareResponse.isTrue() ? 
   AuthenticationResultCode.AUTHENTICATION_HANDLER_SUCCESS : AuthenticationResultCode.AUTHENTICATION_HANDLER_FAILURE, c);

The above response will never be considered success because success for AuthenticationHandlerResponse is determined as:

default boolean isSuccess() {
        return ResultCode.SUCCESS == this.getResultCode();
}

The result-code for compareResponse is always COMPARE_TRUE. Since the response is not considered a success, entry resolvers will not run, resulting in no returned attributes.

I think AuthenticationHandlerResponse should provide an implementation for isSuccess that does this?

boolean isSuccess() {
    return getAuthenticationResultCode() == AUTHENTICATION_HANDLER_SUCCESS;
}
@dfish3r
Copy link
Member

dfish3r commented May 7, 2021

Fixed in #198

@dfish3r dfish3r closed this as completed May 7, 2021
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

No branches or pull requests

2 participants