Hi,

I am making some tests with the resourceserver-filter and i was unable to
properly initialize the filter.

I try with this configuration in the web.xml

<context-param>
<param-name>oauth.rs.provider-class</param-name>
<param-value>com.igz.oauth2.provider.IgzOAuthProvider</param-value>
</context-param>
<filter>
<filter-name>AuthFilter</filter-name>
<filter-class>org.apache.amber.oauth2.rsfilter.OAuthFilter</filter-class>
<init-param>
<param-name>oauth.rs.realm</param-name>
<param-value>ProtectedResource</param-value>
</init-param>
<init-param>
<param-name>oauth.rs.token</param-name>
<param-value>QUERY,HEADER</param-value>
</init-param>
</filter>

With the above config, the filter initializes only
the oauth.rs.provider-class (taken from the
filterConfig.getServletConfig().getAttribute(...) ) but the other two
params was resolved as null.

In the filter class, the initial params are taken from the
filterConfig.getServletContext().getInitParameter(...), and my question is
why get them from the servletContext and not the filterConfig itself (
filterConfig.getInitParameter(...) ). Getting them from filterConfig works
fine. What i am missing?

Thanks.



-- 
Un saludo!.
 [image: Intelygenz] *Alejandro González*
e: [email protected]

msn: [email protected]

Pza. Sta. María Soledad Torres Acosta 2, 5ºC [image: Google
maps]<http://maps.google.es/maps?f=q&source=s_q&hl=es&geocode=&q=intelygenz&sll=40.396764,-3.713379&sspn=8.38053,15.358887&ie=UTF8&hq=intelygenz&hnear=&ll=40.424049,-3.705568&spn=0.016368,0.029998&z=15&iwloc=A>
28004 Madrid
t: +34 91 535 96 12

www.intelygenz.com

Reply via email to