You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@sling.apache.org by Mike Moulton <mi...@meltmedia.com> on 2010/05/26 22:27:36 UTC

Support for multiple FormAuthenticationHandler's

I have the need to bind different FormAuthenticationHandler's to different paths. Looking at the AuthenticationHandler interface there is support for binding a handler to a path, however the implementation of FormAuthenticationHandler as it is today does not seem to support this.

Are there any reasons that the FormAuthenticationHandler can't simply be made a configuration factory? If so, I will work on a patch for this.

-- Mike


:: mike moulton
:: meltmedia
::
:: mike@meltmedia.com
:: 602.648.6810 | direct
:: 602.432.2568 | iphone
:: mmoulton66 | aim


Re: Support for multiple FormAuthenticationHandler's

Posted by Felix Meschberger <fm...@gmail.com>.
Hi Mike,

In this case the regular factory configuration case (creating multiple
FormAuthenticationHandler service instances, one for each configuration)
might make most sense.

Would you mind creating a JIRA for this ? Thanks.

Regards
Felix

On 28.05.2010 09:22, Mike Moulton wrote:
> Felix,
> 
> I have the need to support two different "realms" rooted at different sibling paths in the repository. I would configure each handler use a different cookie / session name and be rooted at unique paths. For this use case, I would probably have each handler have it's own TokenStore as well.
> 
> -- Mike
> 
> 
> On May 27, 2010, at 5:11 AM, Felix Meschberger wrote:
> 
>> Hi,
>>
>> On 26.05.2010 22:27, Mike Moulton wrote:
>>> I have the need to bind different FormAuthenticationHandler's to different paths. Looking at the AuthenticationHandler interface there is support for binding a handler to a path, however the implementation of FormAuthenticationHandler as it is today does not seem to support this.
>>>
>>> Are there any reasons that the FormAuthenticationHandler can't simply be made a configuration factory? If so, I will work on a patch for this.
>>
>> No, it just has not been intended right now. But from my POV nothing
>> prevents us to organize the handler for configuration factories.
>>
>> Now, what exactly would be your use case for having multiple handlers ?
>>
>> Would they be configured the same but all registered for a different
>> path ? This could probably be solved by making the path property
>> multi-value.
>>
>> Would they be configured differnety ? This would have to be solved using
>> configuration factories, no problem for me.
>>
>> Would they have to share the TokenStore or would each handler instance
>> have its own token store ?
>>
>> Regards
>> Felix
>>
>>>
>>> -- Mike
>>>
>>>
>>> :: mike moulton
>>> :: meltmedia
>>> ::
>>> :: mike@meltmedia.com
>>> :: 602.648.6810 | direct
>>> :: 602.432.2568 | iphone
>>> :: mmoulton66 | aim
>>>
>>>
> 
> :: mike moulton
> :: meltmedia
> ::
> :: mike@meltmedia.com
> :: 602.648.6810 | direct
> :: 602.432.2568 | iphone
> :: mmoulton66 | aim
> 
> 

Re: Support for multiple FormAuthenticationHandler's

Posted by Mike Moulton <mi...@meltmedia.com>.
Felix,

I have the need to support two different "realms" rooted at different sibling paths in the repository. I would configure each handler use a different cookie / session name and be rooted at unique paths. For this use case, I would probably have each handler have it's own TokenStore as well.

-- Mike


On May 27, 2010, at 5:11 AM, Felix Meschberger wrote:

> Hi,
> 
> On 26.05.2010 22:27, Mike Moulton wrote:
>> I have the need to bind different FormAuthenticationHandler's to different paths. Looking at the AuthenticationHandler interface there is support for binding a handler to a path, however the implementation of FormAuthenticationHandler as it is today does not seem to support this.
>> 
>> Are there any reasons that the FormAuthenticationHandler can't simply be made a configuration factory? If so, I will work on a patch for this.
> 
> No, it just has not been intended right now. But from my POV nothing
> prevents us to organize the handler for configuration factories.
> 
> Now, what exactly would be your use case for having multiple handlers ?
> 
> Would they be configured the same but all registered for a different
> path ? This could probably be solved by making the path property
> multi-value.
> 
> Would they be configured differnety ? This would have to be solved using
> configuration factories, no problem for me.
> 
> Would they have to share the TokenStore or would each handler instance
> have its own token store ?
> 
> Regards
> Felix
> 
>> 
>> -- Mike
>> 
>> 
>> :: mike moulton
>> :: meltmedia
>> ::
>> :: mike@meltmedia.com
>> :: 602.648.6810 | direct
>> :: 602.432.2568 | iphone
>> :: mmoulton66 | aim
>> 
>> 

:: mike moulton
:: meltmedia
::
:: mike@meltmedia.com
:: 602.648.6810 | direct
:: 602.432.2568 | iphone
:: mmoulton66 | aim


Re: Support for multiple FormAuthenticationHandler's

Posted by Felix Meschberger <fm...@gmail.com>.
Hi,

On 26.05.2010 22:27, Mike Moulton wrote:
> I have the need to bind different FormAuthenticationHandler's to different paths. Looking at the AuthenticationHandler interface there is support for binding a handler to a path, however the implementation of FormAuthenticationHandler as it is today does not seem to support this.
> 
> Are there any reasons that the FormAuthenticationHandler can't simply be made a configuration factory? If so, I will work on a patch for this.

No, it just has not been intended right now. But from my POV nothing
prevents us to organize the handler for configuration factories.

Now, what exactly would be your use case for having multiple handlers ?

Would they be configured the same but all registered for a different
path ? This could probably be solved by making the path property
multi-value.

Would they be configured differnety ? This would have to be solved using
configuration factories, no problem for me.

Would they have to share the TokenStore or would each handler instance
have its own token store ?

Regards
Felix

> 
> -- Mike
> 
> 
> :: mike moulton
> :: meltmedia
> ::
> :: mike@meltmedia.com
> :: 602.648.6810 | direct
> :: 602.432.2568 | iphone
> :: mmoulton66 | aim
> 
>