...
Tip |
---|
|
Set the formObjectClass property of the LogonFormAction instance in cas-servlet.xml . |
Code Block |
---|
| xml |
---|
| xml |
---|
title | Configuring LogonFormAction instance in cas-servlet.xmlxml |
---|
|
<bean
id="loginFormAction"
class="org.jasig.cas.web.flow.LoginFormAction">
<property
name="centralAuthenticationService"
ref="centralAuthenticationService" />
<!--
| we add this property definition, which instructs Spring to
| call setFormObjectClass() on the LoginFormAction instance we're configuring,
| configuring it to use LegacyCasCredentials as the form class.
+-->
<property name="formObjectClass"
value="org.jasig.cas.adaptors.cas.LegacyCasCredentials" />
</bean>
|
...
Tip |
---|
|
Set LegacyCasCredentialsBinder as the credentialsBinder property of the LogonFormAction instance in cas-servlet.xml . |
Code Block |
---|
| xml |
---|
| xml |
---|
title | Configuring LogonFormAction instance in cas-servlet.xmlxml |
---|
|
<bean
id="loginFormAction"
class="org.jasig.cas.web.flow.LoginFormAction">
<property
name="centralAuthenticationService"
ref="centralAuthenticationService" />
<property name="formObjectClass"
value="org.jasig.cas.adaptors.cas.LegacyCasCredentials" />
<!--
| Now we're setting the credentialsBinder JavaBean property of the LogonFormAction instance.
| Here we're instructing Spring to call setCredentialsBinder() on the LogonFormAction instance,
| feeding this property an instance of LegacyCasCredentialsBinder.
|-->
<property name="credentialsBinder">
<bean class="org.jasig.cas.adaptors.cas.LegacyCasCredentialsBinder"/>
</property>
</bean>
|
...
In CAS2, you declared the fully qualified name of your implementation of PasswordHandler in web.xml. Suppose your implementation was edu.someschoool.its.cas.MySpecialPasswordHandler . Then your web.xml included:
Code Block |
---|
| xml |
---|
| xml |
---|
title | Declaring the PasswordHandler in CAS 2 web.xmlxml |
---|
|
<context-param>
<param-name>edu.yale.its.tp.cas.authHandler</param-name>
<param-value>edu.someschoool.its.cas.MySpecialPasswordHandler</param-value>
</context-param>
|
...
Tip |
---|
|
Configure the AuthenticationManager to use a LegacyPasswordHandlerAdaptorAuthenticationManager configured to use your PasswordHandler. |
Code Block |
---|
| xml |
---|
| xml |
---|
title | Declaring the PasswordHandler in CAS3 deployerConfigContext.xmlxml |
---|
|
<bean id="authenticationManager"
class="org.jasig.cas.authentication.AuthenticationManagerImpl">
<property name="credentialsToPrincipalResolvers">
<list>
<bean
class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver" />
<bean
class="org.jasig.cas.authentication.principal.HttpBasedServiceCredentialsToPrincipalResolver" />
</list>
</property>
<property name="authenticationHandlers">
<list>
<bean
class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler" />
<!--
| Here we declare that one of our AuthenticationHandlers is an instance of the CAS 2 PasswordHandler
| adaptor.
+-->
<bean
class="org.jasig.cas.adaptors.cas.LegacyPasswordHandlerAdaptorAuthenticationHandler">
<!--
| Here we give the adaptor a PasswordHandler to adapt.
+-->
<property name="passwordHandler">
<bean
class="edu.someschoool.its.cas.MySpecialPasswordHandler"/>
</property>
</bean>
</list>
</property>
</bean>
|
...
Declare the credential and the CredentialBinder
Code Block |
---|
| xml |
---|
| xml |
---|
title | Configuring LogonFormAction instance in cas-servlet.xmlxml |
---|
|
<bean
id="loginFormAction"
class="org.jasig.cas.web.flow.LoginFormAction">
<property
name="centralAuthenticationService"
ref="centralAuthenticationService" />
<!--
| we add this property definition, which instructs Spring to
| call setFormObjectClass() on the LogonFormAction instance we're configuring,
| configuring it to use LegacyCasTrustedCredentials as the form class.
+-->
<property name="formObjectClass"
value="org.jasig.cas.adaptors.cas.LegacyCasTrustedCredentials" />
<!--
| Here we're instructing Spring to call setCredentialsBinder() on the LogonFormAction instance,
| feeding this property an instance of LegacyCasCredentialsBinder.
| We use the same binder for LegacyCasTrustedCredentials as for LegacyCasCredentials.
|-->
<property name="credentialsBinder">
<bean class="org.jasig.cas.adaptors.cas.LegacyCasCredentialsBinder"/>
</property>
</bean>
|
Adapt and declare your TrustHandler
Code Block |
---|
| xml |
---|
| xml |
---|
title | Declaring the PasswordHandler in CAS3 deployerConfigContext.xmlxml |
---|
|
<bean id="authenticationManager"
class="org.jasig.cas.authentication.AuthenticationManagerImpl">
<property name="credentialsToPrincipalResolvers">
<list>
<bean
class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver" />
<bean
class="org.jasig.cas.authentication.principal.HttpBasedServiceCredentialsToPrincipalResolver" />
</list>
</property>
<property name="authenticationHandlers">
<list>
<bean
class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler" />
<!--
| Here we declare that one of our AuthenticationHandlers is an instance of the CAS 2 PasswordHandler
| adaptor.
+-->
<bean
class="org.jasig.cas.adaptors.cas.LegacyTrustHandlerAdaptorAuthenticationHandler">
<!--
| Here we give the adaptor a TrustHandler to adapt.
+-->
<property name="trustHandler">
<bean
class="edu.someschoool.its.cas.MySpecialTrustHandler"/>
</property>
</bean>
</list>
</property>
</bean>
|