1

I have created Authorization Server and Resource Server with Spring Boot OAuth2 and it works fine with password grant type.

I want to test Authorization Code Flow from Postman. I send such a request to get an access code:

http://localhost:1111/oauth/authorize?response_type=code&client_id=test_client&redirect_uri=www.test_something.com

However, I get an error as follows:

{
    "timestamp": "2018-09-27T21:02:14Z",
    "status": 500,
    "error": "Internal Server Error",
    "exception": "org.springframework.security.authentication.InsufficientAuthenticationException",
    "message": "User must be authenticated with Spring Security before authorization can be completed.",
    "path": "/oauth/authorize"
}

I've tried to send username and password at Basic Authentication HTTP headers but didn't work. I've also send such parameters as form parameters in a POST request and but didn't work too.

How can I make it work? Should I enable a login page for it?

kamaci
  • 72,915
  • 69
  • 228
  • 366

0 Answers0