Marco,
Thanks for the files; going through them and trying to follow everything.
Apparently, you have attached code that understands how the LtpaToken is
generated and will create it for a user after logging in. However, there
are a couple of points I am not understanding at the moment:
1. The LDAP call within the submit() method below is intended to determine a
user¹s FQDN (fully qualified distinguishing name)?
2.
On 10/20/08 8:30 AM, "marc godin" <[EMAIL PROTECTED]> wrote:
> Hi andrew,
> i've extended the flow and add another action on login success
> this for the moment only a prrof off concept code
>
> <action-state id="submit">
> <action bean="authenticationViaFormAction" method="submit" />
> <transition on="warn" to="warn" />
> <transition on="success" to="tokenLogin" />
> <transition on="error" to="viewLoginForm" />
> </action-state>
>
> <!-- creation du ltpaToken -->
> <action-state id="tokenLogin">
> <action bean="loginDominoAction" method="submit"/>
> <transition on="success" to="sendTicketGrantingTicket" />
> </action-state>
>
> the login action ist juste a stupid action who log into domino(we generate a
> token after a ldap search for the Common name),
> the hard part is the LtpaToken.java
>
> public final Event submit(final RequestContext context) throws Exception {
> final UsernamePasswordCredentials credentials =
> (UsernamePasswordCredentials) getFormObject(context);
> final String ticketGrantingTicketId =
> WebUtils.getTicketGrantingTicketId(context);
> final Service service = WebUtils.getService(context);
>
> AndFilter filter = new AndFilter();
> filter.and(new EqualsFilter("objectclass", "person"));
>
> filter.and(new EqualsFilter("objectclass", "Person"));
> filter.and(new EqualsFilter("cn", credentials.getUsername()));
> List lst = ldapTemplate.search("ou=Personnes,o=mycompany",
> filter.toString(),new ContextMapper(){
> public Object mapFromContext(Object ctx) {
> DirContextOperations context=(DirContextOperations )ctx;
> String displayName =
> context.getStringAttribute("displayName");
> return displayName;
> }} );
>
> String displayName = lst.get(0).toString();
>
> //generation du cookie
> Date date = new Date();
>
> //on genere le token
> LtpaToken ltpaCookie = LtpaToken.generate(displayName, date, new
> Date(date.getTime() + Session Duration));
> ltpaCookie.getLtpaToken();
>
> //version maj
> DominoSessionFactory factory = new
> DominoSessionFactory(10,Arrays.asList(
> "serv1", "serv2", "serv3"));
>
> IDominoLoginProxy proxy = new DominoLoginProxy();
> proxy.setFactory(factory);
> RestrictedNotesReturn loginOnDomino =
> proxy.loginOnDomino(ltpaCookie.getLtpaToken());
>
> String token = proxy.generateValidToken(loginOnDomino.token);
>
> Cookie cookie = new Cookie(Config.getCookieName(), token);
> cookie.setDomain(Config.getCookieDomain());
>
> HttpServletResponse response =
> WebUtils.getHttpServletResponse(context);
> response.addCookie(cookie);
>
> return success();
>
> }
>
>
> hop it helps
> regard
> Marc
>
> On Mon, Oct 20, 2008 at 2:17 PM, Andrew Ralph Feller, afelle1
> <[EMAIL PROTECTED]> wrote:
>> Marco,
>>
>> I take it that you grabbing the user credentials and performing Domino login
>> explicitly in your login module and then passing along the LtpaToken,
>> correct?
>>
>> As far as hooking into the flow of things, there are two ways I can see:
>>
>> 1. Creating a custom state within the web flow that does what you want
>> 2. Extend the AuthenticationViaFormAction class to perform extra tasks
>>
>> I prefer the first approach as it isn't couple with the login form.
>>
>> I would be interested in seeing your customization. :)
>
>
>>
>>
>> Thanks,
>> Andrew
>>
>> On 10/18/08 6:30 AM, "killbulle" <[EMAIL PROTECTED]> wrote:
>>
>>> >
>> Hi*2,
>>
>>
>> I've managed to intégrate Domino SSO with CAS, but i'am not fully
>>> > happy with
>> te implémentation
>> i've extended the login wroflow to add an action
>>> > for adding the domino
>> cookie if the login is successful,(after generating a
>>> > token for domino) and
>> rewrite the logout controller to remove the cookie
>> Is
>>> > there a better way like a callback to add post login works ?
>> regards
>> Marc
>> i
>>> > can share the code for those who have to live with domino ;)
>>
>>
>>
>> --
>> View this
>>> > message in context:
>>> >
>>>
http://www.nabble.com/Domino-SSO-int%C3%A9gration-with-CAS-tp20009539p200095>>>
39
>>> > .html
>> Sent from the CAS Users mailing list archive at
>>> > Nabble.com.
>>
>> _______________________________________________
>> Yale CAS mailing
>>> > list
>> [email protected]
>> http://tp.its.yale.edu/mailman/listinfo/cas
>>
>>
>> --
>> Andrew R. Feller, Analyst
>> Information Technology Services
>> 200 Fred Frey Building
>> Louisiana State University
>> Baton Rouge, LA 70803
>> (225) 578-3737 (Office)
>> (225) 578-6400 (Fax)
>>
>> _______________________________________________
>> Yale CAS mailing list
>> [email protected]
>> http://tp.its.yale.edu/mailman/listinfo/cas
>
>
>
> _______________________________________________
> Yale CAS mailing list
> [email protected]
> http://tp.its.yale.edu/mailman/listinfo/cas
--
Andrew R. Feller, Analyst
Information Technology Services
200 Fred Frey Building
Louisiana State University
Baton Rouge, LA 70803
(225) 578-3737 (Office)
(225) 578-6400 (Fax)
_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas