Spring-Security-Oauth2: Full authentication is required to access this resource

前端 未结 7 1992
面向向阳花
面向向阳花 2020-12-02 18:20

I am trying to use spring-security-oauth2.0 with Java based configuration. My configuration is done, but when i deploy application on tomcat and hit the

7条回答
  •  借酒劲吻你
    2020-12-02 19:04

    The client_id and client_secret, by default, should go in the Authorization header, not the form-urlencoded body.

    1. Concatenate your client_id and client_secret, with a colon between them: abc@gmail.com:12345678.
    2. Base 64 encode the result: YWJjQGdtYWlsLmNvbToxMjM0NTY3OA==
    3. Set the Authorization header: Authorization: Basic YWJjQGdtYWlsLmNvbToxMjM0NTY3OA==

提交回复
热议问题