Skip to content
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

o.s.s.o.p.token.store.JdbcTokenStore: Fail to find access token for token ... #2

Open
chao10 opened this issue Dec 19, 2015 · 3 comments

Comments

@chao10
Copy link

chao10 commented Dec 19, 2015

Hello,

I was trying out the rest api calls to /api/secure and /oauth/logout, but met the following error (error log appended below). Any clues as why this happening, and how to fix this?

Thanks.

2015-12-19 15:05:31.848 INFO 7710 --- [nio-9191-exec-1] o.s.s.o.p.token.store.JdbcTokenStore : Failed to find access token for token 91660e2a-63e0-4da7-8b24-0eecbc651d6d
Hibernate: select user0_.username as username1_1_, user0_.activated as activate2_1_, user0_.activationkey as activati3_1_, user0_.email as email4_1_, user0_.password as password5_1_, user0_.resetpasswordkey as resetpas6_1_ from user user0_ where lower(user0_.username)=lower(?)
Hibernate: select authoritie0_.username as username1_1_0_, authoritie0_.authority as authorit2_2_0_, authority1_.name as name1_0_1_ from user_authority authoritie0_ inner join authority authority1_ on authoritie0_.authority=authority1_.name where authoritie0_.username=?

@rajithd
Copy link
Owner

rajithd commented Dec 19, 2015

Could you please give me some more info. Curl commands that you try out ?

@chao10
Copy link
Author

chao10 commented Dec 19, 2015

Yes, I was using curl to access the logout api, like below:

curl -i http://localhost:9191/api/oauth/logout -H "Authorization: Bearer d175c4b6-6e11-4b4f-9300-8eddf280d542"

I did some debugging, and I think it is because the first letter of the HEADER_AUTHORIZATION constant was not capitalized. It really should be "Authorization".

Thanks for all the good work, which helps me a lot. It might be also interesting to know how the user registration works. 👍

@trubbio83
Copy link

trubbio83 commented Aug 26, 2016

OAuth2AccessToken oAuth2AccessToken = tokenStore.readAccessToken(token.split(" ")[0]);
should be
token.split(" ")[1]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants