[ 
https://issues.apache.org/jira/browse/CXF-6573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14726369#comment-14726369
 ] 

Karl von Randow commented on CXF-6573:
--------------------------------------

Ahh thank you, I have just added {{AccessTokenService}} to my JAX-RS 
{{Application}} and as such it uses the JSON provider that I have configured 
there, which isn't the {{OAuthJSONProvider}}. Hence my thinking that the 
{{@XmlElement}} annotations would be useful - and in my case they would... (I 
have managed to work around this by using Jackson's (my JSON provider) mixin 
functionality).

I feel like I've missed some recommended CXF OAuth deployment pattern, that 
would use the {{OAuthJSONProvider}}. Is there some documentation it seems I 
might have missed about the way to set this up?

On the original note, {{AccessTokenService}} is working very nicely as part of 
my main JAX-RS application, so perhaps the {{@XmlElement}} annotations would be 
a nice insurance policy?

> AccessToken doesn't serialize with snake-case
> ---------------------------------------------
>
>                 Key: CXF-6573
>                 URL: https://issues.apache.org/jira/browse/CXF-6573
>             Project: CXF
>          Issue Type: Wish
>          Components: JAX-RS Security
>    Affects Versions: 3.1.2
>            Reporter: Karl von Randow
>            Priority: Minor
>
> The org.apache.cxf.rs.security.oauth2.common.AccessToken class doesn't 
> declare and JAXB (or other) annotations to influence how it is serialized. So 
> it uses the default serialization style of the JAXB context.
> In my case this is camel case.
> This means that the AccessToken response from the AccessTokenService uses 
> camel case. The OAuth docs _appear_ (I'm not a scholar of them) to indicate 
> that it should be snake case.
> Is that true? Is this a thing? Would it be something you'd consider, adding 
> `@XmlElement(name = "token_key")` annotations? That would be a breaking 
> change for existing users...



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Reply via email to