On Thu, Aug 5, 2010 at 1:56 PM, Rahul <rjosh...@gmail.com> wrote:

> Hi Scott,
>
> Thanks for you clear answers. I'm really glad you could take time out for
> this. Just a few more queries (based on my updated understanding of cas)
> should clear the remaining doubts :)
>
> First off let me begin by saying that my goals have been met, so that's a
> relief! What's bothering me though is that I don't I'm doing this the
> correct (or complete) way.
>
> -- STEPS --
>
> 1. I have created three new files -
> 1.1 MyDatabaseAuthenticationHandler (extends
> AbstractJdbcUsernamePasswordAuthenticationHandler)
> 1.2 MyUserCredentials (extends UsernamePasswordCredentials)
> 1.3 MyUserCredentialsToPrincipalResolver(extends
> AbstractPersonDirectoryCredentialsToPrincipalResolver)
>
> 2. Added Custom Handler in deployerConfigContext.xml
>
> 3. Added Custom Resolver in deployerConfigContext.xml
>
> 4. Added new attribs to authenticationViaFormAction bean in cas-servlet.xml
>
> p:formObjectClass="org.jasig.cas.adaptors.jdbc.MyUserCredentials"
> p:formObjectName="credentials"
>
> ----
>
> The above steps have got me going, but I would like to rectify some doubts
> I have before I make merry -
>
> 1. I originally wanted two separate Login Forms eg. /cas/login &
> /cas/mylogin . I fiddled with this long enough to realize that it would
> require lot of changes to create a workflow of that sort in
> login-webflow.xml. Is that a correct assumption?
>

You'd have to have two flows probably.  I've never tried it.


>
> 2. I was under the impression that different login requests (lets say
> username+password & username+password+someid) would be automatically
> resolved into appropriate credentials (UsernamePassword & MyUser), which
> would then be handled by their respective handlers.


No, it can only bind to properties automatically.


> With the above mentioned configuration steps, this wasn't the case. What
> happens is every handler tries to authenticate in sequence until one
> succeeds or result in auth failure till last one. This is correct behavior
> as per docs.
> I would like to know if there is a way we achieve it the way I was
> expecting it?
>

As mentioned previously, you can configure each handler as to what type of
credentials it will process. However, each "form" action only accepts one
form of credentials unless you write something custom.






> 3. Is there even a need for MyUserCredentialsToPrincipalResolver in this
> case? I removed it from deployerConfigContext.xml and it still works fine.
>
>
There shouldn't be unless its doing something special.


> 4. Lastly, can we specify a list of credentials classes in
> p:formObjectClass attribute in cas-servlet.xml?
>
>
Nope, only one.

Cheers,
Scott




> I hope I'm not completely off the hook here with my steps and queries.
>
> Thanks!
> --
> You are currently subscribed to cas-user@lists.jasig.org as:
> scott.battag...@gmail.com
> To unsubscribe, change settings or access archives, see
> http://www.ja-sig.org/wiki/display/JSG/cas-user
>

-- 
You are currently subscribed to cas-user@lists.jasig.org as: 
arch...@mail-archive.com
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-user

Reply via email to