You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@cxf.apache.org by Vassilis Virvilis <v....@biovista.com> on 2018/08/28 10:24:15 UTC
cxf and oauth2 configuration
Hi,
I am taking the tutorial here http://cxf.apache.org/docs/jax-rs-oauth2.html
and I can't find a way to configure the dataProvider in the AccessTokenService class without Spring.
I am using the CXFNonSpringJaxrsServlet
I am currently using
public class MyAccessTokenService extends
org.apache.cxf.rs.security.oauth2.services.AccessTokenService {
public MyAccessTokenService() {
setDataProvider(new MyDataProvider());
}
}
Is there any other way that is officially endorsed?
Thanks in advance
Vassilis
Re: cxf and oauth2 configuration
Posted by Colm O hEigeartaigh <co...@apache.org>.
The documentation here says that there is a way that works for "simple"
properties:
http://cxf.apache.org/docs/jaxrs-services-configuration.html#JAXRSServicesConfiguration-ConfiguringJAX-RSservicesincontainerwithoutSpring
<param-value>
org.apache.cxf.systest.jaxrs.BookApplication
(name=1 id=2)
</param-value>
For your case however, the only other way I can think of is to pass the
name of the DataProvider as a "jaxrs.properties" property and load it in
your access token service implementation.
Colm.
On Tue, Aug 28, 2018 at 11:24 AM Vassilis Virvilis <v....@biovista.com>
wrote:
> Hi,
>
> I am taking the tutorial here
> http://cxf.apache.org/docs/jax-rs-oauth2.html
>
> and I can't find a way to configure the dataProvider in the
> AccessTokenService class without Spring.
>
> I am using the CXFNonSpringJaxrsServlet
>
> I am currently using
>
> public class MyAccessTokenService extends
> org.apache.cxf.rs.security.oauth2.services.AccessTokenService
> {
>
> public MyAccessTokenService() {
> setDataProvider(new MyDataProvider());
> }
> }
>
> Is there any other way that is officially endorsed?
>
> Thanks in advance
>
> Vassilis
>
>
--
Colm O hEigeartaigh
Talend Community Coder
http://coders.talend.com