Added deployerConfigContext...
Benjamin Renard authored 9 years ago
|
1) <?xml version="1.0" encoding="UTF-8"?>
2) <!--
3) | deployerConfigContext.xml centralizes into one file some of the declarative configuration that
4) | all CAS deployers will need to modify.
5) |
6) | This file declares some of the Spring-managed JavaBeans that make up a CAS deployment.
7) | The beans declared in this file are instantiated at context initialization time by the Spring
8) | ContextLoaderListener declared in web.xml. It finds this file because this
9) | file is among those declared in the context parameter "contextConfigLocation".
10) |
11) | By far the most common change you will need to make in this file is to change the last bean
12) | declaration to replace the default SimpleTestUsernamePasswordAuthenticationHandler with
13) | one implementing your approach for authenticating usernames and passwords.
14) +-->
15) <beans xmlns="http://www.springframework.org/schema/beans"
16) xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
17) xmlns:p="http://www.springframework.org/schema/p"
18) xmlns:sec="http://www.springframework.org/schema/security"
19) xsi:schemaLocation="http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-3.0.xsd
20) http://www.springframework.org/schema/security http://www.springframework.org/schema/security/spring-security-3.0.xsd">
21) <!--
22) | This bean declares our AuthenticationManager. The CentralAuthenticationService service bean
23) | declared in applicationContext.xml picks up this AuthenticationManager by reference to its id,
24) | "authenticationManager". Most deployers will be able to use the default AuthenticationManager
25) | implementation and so do not need to change the class of this bean. We include the whole
26) | AuthenticationManager here in the userConfigContext.xml so that you can see the things you will
27) | need to change in context.
28) +-->
29) <bean id="authenticationManager"
30) class="org.jasig.cas.authentication.AuthenticationManagerImpl">
31) <!--
32) | This is the List of CredentialToPrincipalResolvers that identify what Principal is trying to authenticate.
33) | The AuthenticationManagerImpl considers them in order, finding a CredentialToPrincipalResolver which
34) | supports the presented credentials.
35) |
36) | AuthenticationManagerImpl uses these resolvers for two purposes. First, it uses them to identify the Principal
37) | attempting to authenticate to CAS /login . In the default configuration, it is the DefaultCredentialsToPrincipalResolver
38) | that fills this role. If you are using some other kind of credentials than UsernamePasswordCredentials, you will need to replace
39) | DefaultCredentialsToPrincipalResolver with a CredentialsToPrincipalResolver that supports the credentials you are
40) | using.
41) |
42) | Second, AuthenticationManagerImpl uses these resolvers to identify a service requesting a proxy granting ticket.
43) | In the default configuration, it is the HttpBasedServiceCredentialsToPrincipalResolver that serves this purpose.
44) | You will need to change this list if you are identifying services by something more or other than their callback URL.
45) +-->
46) <property name="credentialsToPrincipalResolvers">
47) <list>
48) <!--
49) | UsernamePasswordCredentialsToPrincipalResolver supports the UsernamePasswordCredentials that we use for /login
50) | by default and produces SimplePrincipal instances conveying the username from the credentials.
51) |
52) | If you've changed your LoginFormAction to use credentials other than UsernamePasswordCredentials then you will also
53) | need to change this bean declaration (or add additional declarations) to declare a CredentialsToPrincipalResolver that supports the
54) | Credentials you are using.
55) +-->
56) <!--
57) <bean
58) class="org.jasig.cas.authentication.principal.UsernamePasswordCredentialsToPrincipalResolver" />
59) -->
60) <bean
|