You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@sling.apache.org by connuser1 connuser1 <co...@gmail.com> on 2013/05/27 09:07:30 UTC

When is LoginModulePlugin.getAuthentication called?

Hi

I have written an implementation of LoginModulePlugin. The problem that I
am facing is that whenever my login module plugin gets invoked with an
existing JCR user's credentials, its getAuthentication method is called but
whenever it is invoked with a non-existant JCR user credentials, it never
gets invoked, even though the canHandle method returns true for this
request. Is it necessary for a user with the specified credentials to
already exist in the JCR when authenticating via LoginModulePlugin?

Regards
connuser

Re: When is LoginModulePlugin.getAuthentication called?

Posted by Antonio Sanso <as...@adobe.com>.
On May 29, 2013, at 8:01 PM, connuser1 connuser1 wrote:

Thanks Antonio! That's right. If my getPrinicpal returns a principal,
getAuthentication is invoked and succeeds. I assume that when my
getPrinicpal wasn't returning anything, the principal from jcr was getting
set if available.

correct.

You can see this in  the PluggableDefaultLoginModule class

Regards

Antonio




On Tue, May 28, 2013 at 8:10 PM, Antonio Sanso <as...@adobe.com>> wrote:

Hi Connuser,

the reason why your getAuthentication is never called, I assume, is that
the getPrincipal method in your custom LoginModule returns null

Regards

Antonio

On May 27, 2013, at 9:07 AM, connuser1 connuser1 wrote:

Hi

I have written an implementation of LoginModulePlugin. The problem that I
am facing is that whenever my login module plugin gets invoked with an
existing JCR user's credentials, its getAuthentication method is called
but
whenever it is invoked with a non-existant JCR user credentials, it never
gets invoked, even though the canHandle method returns true for this
request. Is it necessary for a user with the specified credentials to
already exist in the JCR when authenticating via LoginModulePlugin?

Regards
connuser




Re: When is LoginModulePlugin.getAuthentication called?

Posted by connuser1 connuser1 <co...@gmail.com>.
Thanks Antonio! That's right. If my getPrinicpal returns a principal,
getAuthentication is invoked and succeeds. I assume that when my
getPrinicpal wasn't returning anything, the principal from jcr was getting
set if available.


On Tue, May 28, 2013 at 8:10 PM, Antonio Sanso <as...@adobe.com> wrote:

> Hi Connuser,
>
> the reason why your getAuthentication is never called, I assume, is that
> the getPrincipal method in your custom LoginModule returns null
>
> Regards
>
> Antonio
>
> On May 27, 2013, at 9:07 AM, connuser1 connuser1 wrote:
>
> > Hi
> >
> > I have written an implementation of LoginModulePlugin. The problem that I
> > am facing is that whenever my login module plugin gets invoked with an
> > existing JCR user's credentials, its getAuthentication method is called
> but
> > whenever it is invoked with a non-existant JCR user credentials, it never
> > gets invoked, even though the canHandle method returns true for this
> > request. Is it necessary for a user with the specified credentials to
> > already exist in the JCR when authenticating via LoginModulePlugin?
> >
> > Regards
> > connuser
>
>

Re: When is LoginModulePlugin.getAuthentication called?

Posted by Antonio Sanso <as...@adobe.com>.
Hi Connuser,

the reason why your getAuthentication is never called, I assume, is that the getPrincipal method in your custom LoginModule returns null

Regards

Antonio 

On May 27, 2013, at 9:07 AM, connuser1 connuser1 wrote:

> Hi
> 
> I have written an implementation of LoginModulePlugin. The problem that I
> am facing is that whenever my login module plugin gets invoked with an
> existing JCR user's credentials, its getAuthentication method is called but
> whenever it is invoked with a non-existant JCR user credentials, it never
> gets invoked, even though the canHandle method returns true for this
> request. Is it necessary for a user with the specified credentials to
> already exist in the JCR when authenticating via LoginModulePlugin?
> 
> Regards
> connuser