Hi

I would like to have 2 login forms but I want to reuse the same url for both

https://localhost:8443/cas/login display the username and password fields
https://localhost:8443/cas/login?p=custom display username, password and 
custom fields

I have an idea but I don´t know how to do it

In cas's login-webflow.xml

I can have this credentials for https://localhost:8443/cas/login
*<var name="credentials" 
class="org.jasig.cas.authentication.principal.UsernamePasswordCredentials" 
/>*

and this one for https://localhost:8443/cas/login?p=custom
*<var name="newCredentials" class="com.xxx.CustomCredentials" />*
    
This is the orifinal view state
*<view-state id="viewLoginForm" view="casLoginView" model="credentials">*
*        <binder>*
*            <binding property="username" />*
*            <binding property="password" />*
*        </binder>*
*        <on-entry>*
*            <set name="viewScope.commandName" value="'credentials'" />*
*        </on-entry>*
* <transition on="submit" bind="true" validate="true" to="realSubmit">*
*            <evaluate 
expression="authenticationViaFormAction.doBind(flowRequestContext, 
flowScope.credentials)" />*
*        </transition>*
* </view-state>*

I would create another one but this will use another custom model
*<view-state id="newViewLoginForm" parent="#viewLoginForm" 
model="newCredentials">*
*        <binder>*
*            <binding property="username" />*
*            <binding property="password" />*
*            <binding property="newField1" />**
*
*            <binding property="newField2" />**
*
*        </binder>*
*        </view-state>*
*
*
Here I would have to make a decision to redirect to *viewLoginForm *or 
*newViewLoginForm 
*taking into account the param in my url
*<action-state id="generateLoginTicket">*
*        <evaluate 
expression="generateLoginTicketAction.generate(flowRequestContext)" /> *
* <transition on="generated" to="viewLoginForm" />*
* </action-state>*
*
*
Could you help me?

-- 
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-user

Reply via email to