Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Migrated to Confluence 5.3

...

Declare the authentication handler:

Code Block
xml
xml
titleInjecting our authentication handler into the authentication managerxml
<property name="authenticationHandlers">
    <list>
        <bean 
         class="org.jasig.cas.authentication.handler.support.HttpBasedServiceCredentialsAuthenticationHandler" />
	<bean
	class="org.jasig.cas.adaptors.generic.PrincipalBearingCredentialsAuthnHandler" />
    </list>
</property>

And declare our CredentialsToPrincipalResolver:

Code Block
xml
xml
titleInjecting our credentials to principal resolver into the authentication managerxml
<property name="credentialsToPrincipalResolvers">
    <list>
        <bean
            class="org.jasig.cas.authentication.principal.PrincipalBearingCredentialsToPrincipalResolver" />
	<bean
            class="org.jasig.cas.authentication.principal.HttpBasedServiceCredentialsToPrincipalResolver" />
    </list>
</property>

...

Declare our Credentials class and our CredentialsBinder in configuring the Login Form Action in cas-servlet.xml

Code Block
xml
xml
titledeclaring our Credentials class and CredentialsToPrincipalResolver in cas-servlet.xmlxml
<bean
    id="loginFormAction"
    class="org.jasig.cas.web.flow.LoginFormAction">
    <property
        name="centralAuthenticationService"
        ref="centralAuthenticationService" />
    <property
        name="credentialsBinder">
        <bean 
            class="org.jasig.cas.adaptors.generic.RemoteUserCredentialsBinder"/>
    </property>
    <property
        name="formObjectClass"
        value="org.jasig.cas.adaptors.generic.PrincipalBearingCredentials" />
</bean>

...

Declaring the CASFilter

Code Block
xml
xml
1Declaring the CASFilter in web.xmlxml
<filter>
  <filter-name>CAS Filter</filter-name>
  <filter-class>edu.yale.its.tp.cas.client.filter.CASFilter</filter-class>
  <init-param>
    <param-name>edu.yale.its.tp.cas.client.filter.loginUrl</param-name>
    <param-value>https://secure.its.yale.edu/cas/login</param-value>
  </init-param>
  <init-param>
    <param-name>edu.yale.its.tp.cas.client.filter.validateUrl</param-name>
    <param-value>https://secure.its.yale.edu/cas/serviceValidate</param-value>
  </init-param>
  <init-param>
    <param-name>edu.yale.its.tp.cas.client.filter.serverName</param-name>
    <param-value>hkg2.cis.yale.edu:8080</param-value>
  </init-param>
  <init-param>
	<param-name>edu.yale.its.tp.cas.client.filter.wrapRequest</param-name>
	<param-value>true</param-value>
  </init-param>
</filter>

<filter-mapping>
  <filter-name>CAS Validate Filter</filter-name>
  <url-pattern>/login</url-pattern>
</filter-mapping>

...