Torgeir:

Thanks for the suggestion. I ran into some problems when trying your
solution:

MySlideRealmPrincipal is my implementation of Principal. I wanted to add
additional methods to MySlideRealmPrincipal , but how can I access those
methods from WebdavServlet? java.security.Principal is an interface so that
it doesn't allow me to cast req.getUserPrincipal() to MySlideRealmPrincipal
(ClassCastException). I could use Principal.getName() or toString() to
return my own data but it could cause other problems...

Any ideas?

Thanks,
Jingmei

-----Original Message-----
From: Torgeir Veimo [mailto:[EMAIL PROTECTED]]
Sent: Thursday, February 14, 2002 2:49 PM
To: Slide Developers List
Subject: Re: How to authenticate users in WebdavServlet?


Jingmei Li wrote:

> We want to integrate our content management system(CMS) with Slide and we
> need to check users credentials against our CMS before displaying the
> directory structure. Did anyone have any experience with doing
> authentication in WebdavServlet? We extend RealmBase and override
> authenticate() method there but the problem is we need that login
> information in WebdavServlet after authentication...


The servlet can retrieve the principal with the 
request.getUserPrincipal() method. If you need to put specific data into 
that principal, you need to create your own principal impl, and have the 
realm return an instance of that impl.



-- 
-Torgeir


--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

--
To unsubscribe, e-mail:   <mailto:[EMAIL PROTECTED]>
For additional commands, e-mail: <mailto:[EMAIL PROTECTED]>

Reply via email to