spring oauth2.0 login page unauthorized
godpit opened this issue · 8 comments
@godpit please provide more information. What is your configuration, what version of spring cloud are you using?
Can you provide a complete, minimal, verifiable sample that reproduces the problem?
Please don't past screenshots.
Can you provide a complete, minimal, verifiable sample that reproduces the problem?
A little difficult to provide,Please tell me if I can enter the login page without authorization.
i enter the url of 'http://localhost:9060/oauth/authorize', it redirect to http://localhost:9060/login.but it show me unauthorized
i got it, by adding the matcher of url '/login'.
@configuration
@EnableResourceServer
public class ResourceServerConfig extends ResourceServerConfigurerAdapter {
@Override
public void configure(HttpSecurity http) throws Exception {
http.csrf().disable()
.exceptionHandling()
.authenticationEntryPoint((request, response, authException) ->
response.sendError(HttpServletResponse.SC_UNAUTHORIZED)
).and()
.authorizeRequests().antMatchers("/login").permitAll()
.anyRequest().authenticated()
.and()
.httpBasic();
}
}
Closing due to lack of requested feedback. If you would like us to look at this issue, please provide the requested information and we will re-open the issue.