Skip to content
This repository was archived by the owner on May 31, 2022. It is now read-only.

Issue with RemoteTokenServices decoding the /oauth/check_token result #976

Closed
calebkiage opened this issue Feb 13, 2017 · 3 comments
Closed

Comments

@calebkiage
Copy link

calebkiage commented Feb 13, 2017

I've set up an authorization server and a resource server to use the remote token services on spring boot.
The authorization server returns the xml below from the /oauth/check_token endpoint:

<Map>
    <aud>resource_1</aud>
    <aud>resource_2</aud>
    <exp>1487025250</exp>
    <user_name>[email protected]</user_name>
    <authorities>ROLE_ADMIN</authorities>
    <authorities>ROLE_USER</authorities>
    <client_id>client_1</client_id>
    <scope>read</scope>
    <scope>write</scope>
</Map>

The issue is that the decoded authentication doesn't decode the authorities and scopes correctly. It seems to convert the list to a string by taking the last item so the authentication only has the ROLE_USER authority and the write scope.

@calebkiage
Copy link
Author

Okay, so I fixed this by removing com.fasterxml.jackson.dataformat:jackson-dataformat-xml from the build file. Does this mean that xml serialization isn't supported?

@calebkiage
Copy link
Author

I think this is related to FasterXML/jackson-dataformat-xml#11 which will not be fixed. Maybe the documentation could warn users about this?

@arakelian
Copy link

@calebkiage See FasterXML/jackson-dataformat-xml#205 and use the Gist provided in the comments to work around this issue.

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

No branches or pull requests

2 participants