The TGT hasn't been created because the with actually failed. You'll need to put the principal into the webflow at the same time that you catch the auth exception. I can't remember the exact method, but it is something like context.FlowScope.put("principal",principal)

Sent from my iPhone

On Apr 8, 2009, at 11:32 PM, Lekhnath Bhusal <[email protected]> wrote:

Yes, you can access the TicketGrantingTicketId from the request scope like: WebUtils.getTicketGrantingTicketId(context) and from the id you can obtain TicketGrantingTicket from the registry and use that to retrieve net id for the user from authentication attribute.
Lekhnath
Giorgio R. wrote:
Hi All,

weel i need to extend cas because i can't provide an external link for that reason : - the entity management application (external link for change password) is a single sign on service too.

- the user MUST change password before authenticate so : if i let him authenticate he is not FORCED to change his password and he can
surf around sso enabled services and logout without change it;
if i don't let user authenticate (unique way) he can't navigate in entity management application so he can't change his password from here.


I'm trying to do something like that (thanks to eric for
suggestion):


<view-state id="viewLoginForm" view="casLoginView">
 <render-actions>
   <action bean="authenticationViaFormAction" method="setupForm"/>
<action bean="authenticationViaFormAction" method="referenceData"/>
 </render-actions>
 <transition on="submit" to="bindAndValidate" />
</view-state>


<action-state id="bindAndValidate">
 <action bean="authenticationViaFormAction" />
 <transition on="success" to="submit" />
 <transition on="error" to="viewLoginForm" />
</action-state>


<action-state id="submit">
 <action bean="authenticationViaFormAction" method="submit" />
   <transition on="warn" to="warn" />
<!--CUSTOM TRANSITION-->
   <transition on="forceChangePassword" to "viewChangePassword"/>
   <transition on="success" to="sendTicketGrantingTicket" />
   <transition on="error" to="viewLoginForm" />
</action-state>

<!-- CUSTOM VIEW -->
<view-state id="viewChangePassword" view="casChangePasswordView">
 <render-actions>
   <action bean="changePasswordAction" method="setupForm"/>
   <action bean="changePasswordAction" method="referenceData"/>
 </render-actions>
 <transition on="submit" to="saveNewPassword" />
</view-state>

<!-- CUSTOM ACTION -->
<action-state id="saveNewPassword">
 <action bean="changePasswordAction" method="submit" />
   <transition on="success" to="sendTicketGrantingTicket" />
   <transition on="error" to="changePasswordAction" />
</action-state>



In casChangePasswordView jsp i would like to have only 2 form's input : the new password and the confirm of that (the user isn't authenticate but the old password he give me was correct so i would like not check old password again). The problem is : to save new
password i need to know for wich username (netid). Can i obtain
netid in submit method of changePasswordAction ? If yes (i really
hope) how ?

Thanks all very much
Giorgio


--
You are currently subscribed to [email protected] as: [email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-dev

--
You are currently subscribed to [email protected] as: 
[email protected]
To unsubscribe, change settings or access archives, see 
http://www.ja-sig.org/wiki/display/JSG/cas-dev

Reply via email to