Open bejondshao opened 6 years ago
Update: I find out the reason. I set regex in MobileAuthenticationFilter is not "/login". After change to "/login", it works. But change <security:form-login login-page="/login"
to <security:form-login login-page="/newlogin"
doesn't work...
And a new issue comes, No AuthenticationProvider found for org.mitre.openid.connect.mobile.MobileAuthenticationToken
is thrown when do No AuthenticationProvider found for org.mitre.openid.connect.mobile.MobileAuthenticationToken;
. I'm sure MobileAuthenticationProvider
implements supports() with
@Override
public boolean supports(Class<?> authentication) {
return MobileAuthenticationToken.class.isAssignableFrom(authentication);
}
Maybe I didn't regist MobileAuthenticationProvider to AuthoriticationManager? How to regist it through xml?
============= Update:
Finally, I regist it via xml.
<security:authentication-manager id="authenticationManager">
<security:authentication-provider ref="mobileAuthenticationProvider" />
<security:authentication-provider>
<security:jdbc-user-service data-source-ref="dataSource"/>
</security:authentication-provider>
</security:authentication-manager>
I met a new issue now. It shows me login successfully. And I get a token. It also can get user by username in UserInfoInterceptor. But the home page is still shows "Login", when I click it. It redirect me to login page.
Hi there, I know the issue is kind of should not be here. But I've searched for days to change default authentication filter. The sample from google shows about spring boot config. Like
#EnableWebSecurity BrowserSecurityConfig extends WebSecurityConfigurerAdapter
, I set breakpoint to configure() nothing happened. I try to change user-context.xml toI can use custome login page, but when I click "Login", it filtered by MobileAuthenticationFilter, but didn't call attemptAuthentication(). It is always catched by UsernamePasswordAuthenticationFilter and call attemptAuthentication(). I believe I should change user-context.xml, but can you point out where I'm wrong? Thanks.