简体   繁体   中英

Simple Spring Oauth2 flow using Postman

hello i'm a beginner with Oauth2 flow. I'm working with a simple example : Github Project here but i failed at making a proper connection. I have received an error message like : "couldn't complete Oauth 2.0 login "

I filled the Request Token popup with the values below :

Callback URL : getpostman.com/oauth2/callback

Token Name : mytoken

Auth URL : localhost:8080/admin/oauth

Acces Token URL : localhost:8080/admin/oauth/token

ClientID : my-client-with-secret

Client Secret : secret

Grant Type : Authorization Code

Whats wrong with the information i provided ?

Thanks

There are a few incorrect things that I've noticed.

  1. Auth URL value should be localhost:8080/admin/oauth/authorize
  2. As "Grant Type" you've set "Authorization Code" in your request, but at the server side for that user (ClientID : my-client-with-secret /Client Secret : secret) the allowed grant types are "client_credentials" and "password".

Although this post is a few months old and probably you've solved your problem , it may help someone with similar problem like yours.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM