[
https://issues.apache.org/jira/browse/CXF-6573?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14729797#comment-14729797
]
Karl von Randow commented on CXF-6573:
--------------------------------------
Thanks Sergey, I absolutely understand about not introducing Jackson project
dependencies. I don't believe it's possible to achieve the same thing with JAXB
annotations.
I can achieve most if not all of what I suggested above using Jackson's mixins.
The reason I'm using Jackson is because the AccessTokenService is added to an
existing JAX-RS application with a lot of other services in it. I will try
adding the OAuthJSONProvider. I'm sorry I didn't try that; I didn't understand
how it would choose that provider over the Jackson one (and still don't - would
love a pointer) so I was reluctant as it felt like it might be unstable.
I have added OAuthJSONProvider to my application singletons and all appears
well. Thank you! If you haven't already, it might be useful to add a comment or
a {{@see}} or whatever to AccessToken, ClientAccessToken, and OAuthError
directing people to the OAuthJSONProvider.
> 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)