You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@shindig.apache.org by "Kevin Brown (JIRA)" <ji...@apache.org> on 2009/01/13 23:46:59 UTC

[jira] Resolved: (SHINDIG-792) UrlParameterAuthenticationHandler is not extensible

     [ https://issues.apache.org/jira/browse/SHINDIG-792?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Kevin Brown resolved SHINDIG-792.
---------------------------------

       Resolution: Fixed
    Fix Version/s: trunk
         Assignee: Kevin Brown

> UrlParameterAuthenticationHandler is not extensible
> ---------------------------------------------------
>
>                 Key: SHINDIG-792
>                 URL: https://issues.apache.org/jira/browse/SHINDIG-792
>             Project: Shindig
>          Issue Type: Improvement
>          Components: Gadget Rendering Server (Java)
>    Affects Versions: 1.0.x-incubating
>            Reporter: Henning Schmiedehausen
>            Assignee: Kevin Brown
>             Fix For: trunk
>
>         Attachments: SHINDIG-792.patch
>
>
> The URLParameterAuthenticationHandler is injected at some places inside the Shindig codebase (AuthenticationModule, AuthenticationHandlerProvider) so to override it, one must extend it. However, the class itself is not really extensible. With this patch, it is possible to do e.g. the following thing:
> --- cut ---
> public class MyAuthenticationHandler extends UrlParameterAuthenticationHandler
> {
>     @Inject
>     public NingAuthenticationHandler(SecurityTokenDecoder securityTokenDecoder)
>     {
>         super(securityTokenDecoder);
>     }
>     @Override
>     protected Map<String, String> getMappedParameters(final HttpServletRequest req) {
>         final Map<String, String> params = new HashMap<String, String>(super.getMappedParameters(req));
>         params.put("param1", req.getParameter("param1"));
>         params.put("param2", req.getParameter("param2"));
>         params.put("param3", req.getParameter("param3"));
>         return params;
>     }
> }
> --- cut ---
> Which in concert with the injected SecurityTokenDecoder allows custom decoding. Else, the whole injection of the token decoder is moot because you can't pass additional parameters into it.

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.