You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
According to the authlib document, if user uses'client_secret_basic' client auth method, 'HTTP Basic Authorization' can be used. However, with 'HTTP basic Authorization' it failed to get token.
Uh oh!
There was an error while loading. Please reload this page.
According to the authlib document, if user uses'client_secret_basic' client auth method, 'HTTP Basic Authorization' can be used. However, with 'HTTP basic Authorization' it failed to get token.
Successfully getting token using "curl -u <client_id>:<client_format>"
[root@server ~]# curl -u e7Ll5b67Xv5zZKZBuLLwoOWm:gkZICKnukGLDQmT0PMa1Yp2r11dKL7OmLjiKZFGwMPLRAGrn -XPOST http://127.0.0.1:5001/oauth/token -F grant_type=password -F username=opuser -F password=valid
{"access_token": "MWptz8DVDYYfqYy6inSHq2phkvZZ6fyo8TgDEgEpKK", "expires_in": 864000, "refresh_token": "oQJpPhiTXi10AzfwNfoKQshvE4YosI86FMHY4ban5BzG7JI3", "token_type": "Bearer"}
Failed to get token using "encoded client credentials"
[root@server ~]# echo -n 'e7Ll5b67Xv5zZKZBuLLwoOWm:gkZICKnukGLDQmT0PMa1Yp2r11dKL7OmLjiKZFGwMPLRAGrn' | base64
c
[root@server ~]#
[root@server ~]# curl -H "Content-Type: application/x-www-form-urlencoded" -H "Authorization: Basic ZTdMbDViNjdYdjV6WktaQnVMTHdvT1dtOmdrWklDS251a0dMRFFtVDBQTWExWXAycjExZEtMN09tTGppS1pGR3dNUExSQUdybg==" -XPOST http://127.0.0.1:5001/oauth/token -F grant_type=password -F username=opuser -F password=valid
{"error": "invalid_grant"}
-----------Updated---------------
Oh, without using '-H "Content-Type: application/x-www-form-urlencoded"', http basic authentication works fine..
The text was updated successfully, but these errors were encountered: