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
oauth2-vanilla got "invalid_token" error #150
Comments
Your token has a very short expiry. Maybe it just expired? Are you running the code from this project (the token expiry is not so short by default)? |
I just clone it from github, and did not change anything. And the git commit id of my gitlog is 04cb955 |
There's a line in the
(so the default is quite low in this app - probably someone was testing token expiry). |
Thanks, and now curl -H "Authorization: bearer $TOKEN" localhost:9000 returned the right result. And in the ui app console, I got Access denied error:
|
Right, but the UI (on port 8080) is not an OAuth2 resource server, so that's expected. |
Otherwise it's hard to test and can be confusing (see gh-150)
In this oauth2-vanilla example, the UI application has these two annotations:
Dos't it mean that we should access resource from the gateway at 8080? |
Yes, that's the whole point of a gateway. |
So That's the problems i encountered, as last comment posted:
I do use the 8080 to access 9000, but can't pass oauth2. |
It's expected. The gateway is not an OAuth2 resource, as I already pointed out. You have to authenticate with it through the browser (I mean, you could do it with |
That is what i want to implemented: |
The gateway in this sample is not an OAuth2 resource (as I keep saying). The "resource" server is (if you need a sample). |
here is my step:
NO RESULT
The text was updated successfully, but these errors were encountered: