You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Jason Wang <ja...@gmail.com> on 2013/12/24 02:55:24 UTC

AccessTokenService returns reponse with lower case and underscores

Hi all,

Merry Xmas to everyone.

Just a quick question before I leave work, I found that in Oauth2 CXF
2.7.8,
the accessTokenService returns response like this:

Payload:
{"access_token":"8cb4a86829b70fdf3567ff49c1dba46","token_type":"bearer","expires_in":3600}

Everything in lower case and underscores.

All of our other services use camelCases. Is there an easy way to configure
the output?

We are using JacksonJsonProvider BTW.

Cheers,

Jason

Re: AccessTokenService returns reponse with lower case and underscores

Posted by Sergey Beryozkin <sb...@gmail.com>.
Hi
On 24/12/13 01:55, Jason Wang wrote:
> Hi all,
>
> Merry Xmas to everyone.
>
Thanks, happy Christmas and New Year to you too
> Just a quick question before I leave work, I found that in Oauth2 CXF
> 2.7.8,
> the accessTokenService returns response like this:
>
> Payload:
> {"access_token":"8cb4a86829b70fdf3567ff49c1dba46","token_type":"bearer","expires_in":3600}
>
> Everything in lower case and underscores.
>
This is per the specification text
> All of our other services use camelCases. Is there an easy way to configure
> the output?
>
> We are using JacksonJsonProvider BTW.
>
Well, AccessTokenService endpoint is expected to be configured with 
OAuthJSONProvider which provides the output, you can replace it with 
your custom provider, but if you customize the output then you have an 
interoperability issue, where the code written by 3rd party clients 
fails to parse say 'accessToken', expecting 'access_token' instead

Cheers, Sergey

> Cheers,
>
> Jason
>