-
Notifications
You must be signed in to change notification settings - Fork 338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
AJAX call how to pass (-vu clientapp:123456) #24
Comments
Instead of clientapp:123456, you should set Authorization header to your ajax call. It will look something like this. |
Hi Karthik Srinivasan, Thank you for response, but not working. when I ran with curl command: curl -X POST -vu clientapp:123456 http://localhost:8080/oauth/token -H "Accept: application/json" -d "password=admin&username=admin&grant_type=password&scope=read%20write&client_secret=123456&client_id=clientapp" with out passing -vu clientapp:123456 on curl also I am getting same error " Thank you Regards |
This is just standard OAuth 2 flows illustrating a password grant (based on HTTP Basic auth). There are different types of OAuth 2 flows. Regardless of the client technology and language, you'll need to construct the HTTP requests in a similar manner. See this test as an example. |
the
|
curl -X POST http://localhost:8080/oauth/token -H "Accept: application/json" -H "Authorization: Basic Y2xpZW50YXBwOjEyMzQ1Ng==" -d "password=admin&username=admin&grant_type=password&scope=read%20write&client_secret=123456&client_id=clientapp" This may work |
Hi, What does Y2xpZW50YXBwOjEyMzQ1Ng == ? |
Hi, What does Y2xpZW50YXBwOjEyMzQ1Ng == ? I have tried many way but unsucceed. I have problem with "-vu clientapp:123456". I run unit test "greetingAuthorized" is ok. |
HI Roy,
Thank you for spring-rest-service-oauth.
I have small issue when I try to run with curl command its working fine no issues, but when we try to
run with AJAX call how to pass (-vu clientapp:123456), without -vu clientapp:123456 I am getting "Full authentication is required to access this resource", please could you suggest me on this.
I am trying with swagger also, for principal parameter I am passing clientapp:123456, but an getting the same error "Full authentication is required to access this resource".
Thank you
Regards
-Durga K
The text was updated successfully, but these errors were encountered: