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

AjaxAuthenticationProvider&JwtAuthenticationProvider #15

Open
SuperNoobTao opened this issue Jan 23, 2018 · 1 comment
Open

AjaxAuthenticationProvider&JwtAuthenticationProvider #15

SuperNoobTao opened this issue Jan 23, 2018 · 1 comment

Comments

@SuperNoobTao
Copy link

Hello:
I have a problem on AjaxAuthenticationProvider and JwtAuthenticationProvider.
I see the configuration of both two in the WebSecurityConfig.
It likes that:

    @Override
    protected void configure(AuthenticationManagerBuilder auth) {
        auth.authenticationProvider(ajaxAuthenticationProvider);
        auth.authenticationProvider(jwtAuthenticationProvider);
    }

And I know that when I input '/login' ,it will enter AjaxLoginProcessingFilter , when I input '/api/me' ,it will enter JwtTokenAuthenticationProcessingFilter .
The question is that :
There are two Provider(AjaxAuthenticationProvider and JwtAuthenticationProvide). When I enter AjaxLoginProcessingFilter it always choose ajaxAuthenticationProvider. When I enter JwtTokenAuthenticationProcessingFilter it always choose jwtAuthenticationProvider. Why? How it always choose the right Provider???

@SuperNoobTao
Copy link
Author

Oh,I think I found the answer. Is that depends on method 'supports' in the 'Provider'???

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

1 participant