Created
June 13, 2013 20:11
-
-
Save serac/5776933 to your computer and use it in GitHub Desktop.
PolicyBasedAuthenticationManager Example
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <bean id="passwordHandler" | |
| class="org.jasig.cas.authentication.LdapAuthenticationHandler"> | |
| <!-- Details elided for simplicity --> | |
| </bean> | |
| <bean id="oneTimePasswordHandler" | |
| class="com.example.cas.authentication.CustomOTPAuthenticationHandler" | |
| p:name="oneTimePasswordHandler" /> | |
| <bean id="authenticationPolicy" | |
| class="org.jasig.cas.authentication.RequiredHandlerAuthenticationPolicyFactory" | |
| c:requiredHandlerName="passwordHandler" | |
| p:tryAll="true" /> | |
| <bean id="ldapPrincipalResolver" | |
| class="org.jasig.cas.authentication.principal.CredentialsToLdapAttributePrincipalResolver"> | |
| <!-- Details elided for simplicity --> | |
| </bean> | |
| <bean id="authenticationManager" | |
| class="org.jasig.cas.authentication.PolicyBasedAuthenticationManager" | |
| p:authenticationPolicy-ref="authenticationPolicy"> | |
| <constructor-arg> | |
| <map> | |
| <entry key-ref="passwordHandler" value-ref="ldapPrincipalResolver"/> | |
| <entry key-ref="oneTimePasswordHandler" value-ref="ldapPrincipalResolver" /> | |
| </map> | |
| </constructor-arg> | |
| <property name="authenticationMetaDataPopulators"> | |
| <bean class="org.jasig.cas.authentication.SuccessfulHandlerMetaDataPopulator" /> | |
| </property> | |
| </bean> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment