You can extend the CAS UsernamePasswordCredentials class.  Typically, you would 
do this in the src directory.  I don't know what version of CAS you are using.  
Spring will populate the fields of your credentials object, since it is the 
form object for your login JSP page.

 

public class MyUsernamePasswordCredentials extends UsernamePasswordCredentials {

      // Add your own fields with getters and setters to this bean.

}

 

 

Then, you would tell CAS in the cas-servlet.xml file to use your customized 
credentials class.  You can cast to your customized class in your 
authentication handler.

 

           The form object class is the Spring command class. -->

      <bean

            id="authenticationViaFormAction"

            parent="abstractCasLoginAction"

            class="org.jasig.cas.web.flow.AuthenticationViaFormAction">

            <property name="formObjectClass" 
value="com.mycompany.cas.authentication.principal.MyUsernamePasswordCredentials"/>

            <property name="formObjectName" value="credentials"/>

            <property name="validator" 
ref="usernamePasswordCredentialsValidator"/>

    </bean>

 

 

________________________________

From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED] On Behalf Of Angel Q
Sent: Wednesday, November 21, 2007 12:32 PM
To: Yale CAS mailing list
Cc: Angel Gobernalia
Subject: modify login to use 3 fields

 

Hello List,

Maybe I am repeating myself, but I just don't seem to get it.

I need to modify the login so I have 3 fields input by the user:
Company ID
UserName
Password

My LDAP is already modified and the structure is:
DN: cn=[UserName],ou=[CompanyId],dc=example,dc=com


How can I get this going? Do I need to change any classes on the cas server?

Thank you very much for your help guys,

Angel Quintana

 

________________________________


¿Chef por primera vez? - Sé un mejor Cocinillas.
Entra en Yahoo! Respuestas 
<http://es.rd.yahoo.com/evt:51361/*http:/es.answers.yahoo.com/dir/index;_ylc=X3oDMTE4ZWhyZjU0BF9TAzIxMTQ3MTQzMjIEc2VjA0Jhbm5lcgRzbGsDQWNxdWlzaXRpb24-?link=over&sid=396545367>
 .



This e-mail and any files transmitted with it are confidential and are intended 
solely for the use of the individual or entity to whom they are addressed.  
This communication may contain information that is protected from disclosure by 
applicable law.  If you are not the intended recipient, or the employee or 
agent responsible for delivering this communication to the intended recipient, 
be advised that you have received this e-mail in error and any use, 
dissemination, forwarding, printing or copying of this e-mail is strictly 
prohibited.  If you believe that you have received this e-mail in error, please 
immediately notify Edgewater Technology by telephone at (781) 246-3343 and 
delete the communication from all e-mail files.

_______________________________________________
Yale CAS mailing list
[email protected]
http://tp.its.yale.edu/mailman/listinfo/cas

Reply via email to