You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@jackrabbit.apache.org by imadhusudhanan <im...@zohocorp.com> on 2009/01/22 10:31:46 UTC

Reg SimpleLoginModule and SimpleAccessManager extension ..

Dear All,

    I plannin to extend the SimpleLoginModule and SimpleAccessManager and customize the same for my application. Firstly, how do I get the crendentials of the user when he inputs it thru the authentiation window. Is there a possibility to get the SimpleCredential Object so the I use the same to verify against my db. Pls do reply. Take Care.

Regards,
MadhuSudhanan I.
www.zoho.com
'If you wanna walk quick Walk Alone, if you wanna walk far Walk Together ..."

Re: Reg SimpleLoginModule and SimpleAccessManager extension ..

Posted by imadhusudhanan <im...@zohocorp.com>.
So finally it worked, my extended LoginModule is working !! Thanks Jukka for the support. 

Regards,
MadhuSudhanan I.
www.zoho.com
'If you wanna walk quick Walk Alone, if you wanna walk far Walk Together ..."



---- On Thu, 22 Jan 2009 imadhusudhanan <im...@zohocorp.com> wrote ---- 

 > THanks Jukka.
 > 
 > Regards,
 > MadhuSudhanan I.
 > http://zoho.com
 > 'If you wanna walk quick Walk Alone, if you wanna walk far Walk Together ..."
 > 
 > 
 > 
 > ---- On Thu, 22 Jan 2009 Jukka Zitting <ju...@gmail.com> wrote ---- 
 > 
 > Hi, 
 >  
 > On Thu, Jan 22, 2009 at 4:25 PM, imadhusudhanan 
 > <im...@zohocorp.com> wrote: 
 > > Can't I by pass the Authentication technique used by jackrabbit i.e. JAAS 
 > > and provide my own authentication technique ie Basic Auth which i already 
 > > implemented in my webapp. 
 >  
 > Jackrabbit always uses JAAS to manage authentication, but nothing 
 > stops you from implementing your own Credentials class and looking for 
 > those credentials in a custom LoginModule. 
 >  
 > Alternatively, if you've already authenticated the user by the time 
 > you call Repository.login(), you could simply fill in a normal 
 > SimpleCredentials instance for the user and use Jackrabbit's 
 > SimpleLoginModule that simply accepts any username and password as 
 > valid. 
 >  
 > BR, 
 >  
 > Jukka Zitting 
 >    

Re: Reg SimpleLoginModule and SimpleAccessManager extension ..

Posted by imadhusudhanan <im...@zohocorp.com>.
THanks Jukka.

Regards,
MadhuSudhanan I.
www.zoho.com
'If you wanna walk quick Walk Alone, if you wanna walk far Walk Together ..."



---- On Thu, 22 Jan 2009 Jukka Zitting <ju...@gmail.com> wrote ---- 

 > Hi, 
 >  
 > On Thu, Jan 22, 2009 at 4:25 PM, imadhusudhanan 
 > <im...@zohocorp.com> wrote: 
 > > Can't I by pass the Authentication technique used by jackrabbit i.e. JAAS 
 > > and provide my own authentication technique ie Basic Auth which i already 
 > > implemented in my webapp. 
 >  
 > Jackrabbit always uses JAAS to manage authentication, but nothing 
 > stops you from implementing your own Credentials class and looking for 
 > those credentials in a custom LoginModule. 
 >  
 > Alternatively, if you've already authenticated the user by the time 
 > you call Repository.login(), you could simply fill in a normal 
 > SimpleCredentials instance for the user and use Jackrabbit's 
 > SimpleLoginModule that simply accepts any username and password as 
 > valid. 
 >  
 > BR, 
 >  
 > Jukka Zitting  

Re: Reg SimpleLoginModule and SimpleAccessManager extension ..

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Thu, Jan 22, 2009 at 4:25 PM, imadhusudhanan
<im...@zohocorp.com> wrote:
> Can't I by pass the Authentication technique used by jackrabbit i.e. JAAS
> and provide my own authentication technique ie Basic Auth which i already
> implemented in my webapp.

Jackrabbit always uses JAAS to manage authentication, but nothing
stops you from implementing your own Credentials class and looking for
those credentials in a custom LoginModule.

Alternatively, if you've already authenticated the user by the time
you call Repository.login(), you could simply fill in a normal
SimpleCredentials instance for the user and use Jackrabbit's
SimpleLoginModule that simply accepts any username and password as
valid.

BR,

Jukka Zitting

Re: Reg SimpleLoginModule and SimpleAccessManager extension ..

Posted by imadhusudhanan <im...@zohocorp.com>.
Thanks Jukka,
    BTW I have few questions,
        
 Can't I by pass the Authentication technique used by jackrabbit i.e. JAAS and provide my own authentication technique ie Basic Auth which i already implemented in my webapp.

 
Regards,
MadhuSudhanan I.
www.zoho.com
'If you wanna walk quick Walk Alone, if you wanna walk far Walk Together ..."



---- On Thu, 22 Jan 2009 Jukka Zitting <ju...@gmail.com> wrote ---- 

 > Hi, 
 >  
 > On Thu, Jan 22, 2009 at 1:11 PM, imadhusudhanan 
 > <im...@zohocorp.com> wrote: 
 > > If you dont mind .. could u pls send me the jaas documentation link. 
 >  
 > See for example: 
 > http://java.sun.com/j2se/1.4.2/docs/guide/security/jaas/tutorials/GeneralAcnOnly.html 
 >  
 > Also, you might want to take a look at the LoginModule implementation 
 > included in Jackrabbit. 
 >  
 > BR, 
 >  
 > Jukka Zitting  

Re: Reg SimpleLoginModule and SimpleAccessManager extension ..

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Thu, Jan 22, 2009 at 1:11 PM, imadhusudhanan
<im...@zohocorp.com> wrote:
> If you dont mind .. could u pls send me the jaas documentation link.

See for example:
http://java.sun.com/j2se/1.4.2/docs/guide/security/jaas/tutorials/GeneralAcnOnly.html

Also, you might want to take a look at the LoginModule implementation
included in Jackrabbit.

BR,

Jukka Zitting

Re: Reg SimpleLoginModule and SimpleAccessManager extension ..

Posted by imadhusudhanan <im...@zohocorp.com>.
If you dont mind .. could u pls send me the jaas documentation link. I m tired of searching and literally confused seeing lot many solutions.take care.

Regards,
MadhuSudhanan I.
www.zoho.com
'If you wanna walk quick Walk Alone, if you wanna walk far Walk Together ..."



---- On Thu, 22 Jan 2009 Jukka Zitting <ju...@gmail.com> wrote ---- 

 > Hi, 
 >  
 > On Thu, Jan 22, 2009 at 10:31 AM, imadhusudhanan 
 > <im...@zohocorp.com> wrote: 
 > >     I plannin to extend the SimpleLoginModule and SimpleAccessManager and 
 > > customize the same for my application. Firstly, how do I get the 
 > > crendentials of the user when he inputs it thru the authentiation window. Is 
 > > there a possibility to get the SimpleCredential Object so the I use the same 
 > > to verify against my db. 
 >  
 > See the JAAS documentation for how to use callback handlers to get 
 > such information. Jackrabbit contains the CredentialsCallbackHandler 
 > class that you can use to retrieve the Credentials associated with a 
 > login request. 
 >  
 > BR, 
 >  
 > Jukka Zitting  

Re: Reg SimpleLoginModule and SimpleAccessManager extension ..

Posted by Jukka Zitting <ju...@gmail.com>.
Hi,

On Thu, Jan 22, 2009 at 10:31 AM, imadhusudhanan
<im...@zohocorp.com> wrote:
>     I plannin to extend the SimpleLoginModule and SimpleAccessManager and
> customize the same for my application. Firstly, how do I get the
> crendentials of the user when he inputs it thru the authentiation window. Is
> there a possibility to get the SimpleCredential Object so the I use the same
> to verify against my db.

See the JAAS documentation for how to use callback handlers to get
such information. Jackrabbit contains the CredentialsCallbackHandler
class that you can use to retrieve the Credentials associated with a
login request.

BR,

Jukka Zitting