1- <?xml version =" 1.0" encoding =" UTF-8" ?>
2- <components xmlns =" http://www.springframework.org/springpython/schema/components"
3- xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4- xsi : schemaLocation =" http://www.springframework.org/springpython/schema/components
5- http://springpython.webfactional.com/schema/context/spring-python-context-1.0.xsd" >
6-
7- <description >
8- This application context is used to show various components, defined using the
9- code completion tools found in Eclipse, while pointed at an XSD spec.
10-
11- Please note that this sample is used to show pycontainer's format, which is supported
12- by the XSD spec.
13- </description >
14-
15- <description >You can have multiple descriptions at the root level.</description >
16-
17- <component id =" user_details_service" class =" springpython.security.userdetails.InMemoryUserDetailsService" >
18- <description >
19- This is an in-memory list of users, with their password and roles. It is valuable
20- for unit testing without interacting with the real user authentication subsystem.
21-
22- The value between the property tags is run through a python evaluator, so it will
23- translate the {...} text into a python dictionary with two entries.
24- </description >
25- <property name =" user_dict" >
26- {
27- "basicuser": ("password1", ["ROLE_BASIC"], True),
28- "otheruser": ("password2", ["ROLE_OTHER"], True)
29- }
30- </property >
31- </component >
32-
33- <component id =" auth_provider" class =" springpython.security.providers.dao.DaoAuthenticationProvider" >
34- <description >This component has a property which references another component by name.</description >
35- <property name =" user_details_service" local =" user_details_service" />
36- </component >
37-
38- <component id =" auth_manager" class =" springpython.security.providers.AuthenticationManager" >
39- <description >
40- This component has a property that holds a list of values, and in this case, is
41- loading the list with references to other components.
42- </description >
43- <property name =" auth_providers" >
44- <list local =" auth_provider" />
45- </property >
46- </component >
47-
48- <description >
49- The following is a component with no properties.
50-
51- NOTE: This description is not tied to the RoleVoter component.
52- </description >
53-
54- <component id =" roleVoter" class =" springpython.security.vote.RoleVoter" />
55-
56- <component id =" access_decision_mgr" class =" springpython.security.vote.UnanimousBased" >
57- <description >
58- This component has a mix of properties.
59-
60- The first property is evaluated as a python boolean False, NOT as a string of "False".
61-
62- The second property is a list, and will contain one entry, a reference to the roleVoter
63- component.
64- </description >
65- <property name =" allow_if_all_abstain" >False</property >
66- <property name =" access_decision_voters" >
67- <list local =" roleVoter" />
68- </property >
69- </component >
70-
71- <component id =" securityInteceptor" class =" springpython.security.intercept.MethodSecurityInterceptor" >
72- <property name =" validate_config_attributes" >False</property >
73- <property name =" auth_manager" local =" auth_manager" />
74- <property name =" access_decision_mgr" local =" access_decision_mgr" />
75- <property name =" obj_def_source" >
76- [
77- ("springpythontest.support.testSecurityClasses.SampleService.get.*", ["ROLE_BASIC"]),
78- ("springpythontest.support.testSecurityClasses.SampleService.do.*", ["ROLE_BASIC"]),
79- ("springpythontest.support.testSecurityClasses.SampleService.update.*", ["ROLE_MGR"])
80- ]
81- </property >
82- </component >
83-
84- <description >This is another stand alone component</description >
85- <component id =" targetService" class =" springpythontest.support.testSecurityClasses.SampleService" />
86-
87- <component id =" sampleService" class =" springpython.aop.ProxyFactoryObject" >
88- <description >
89- Hopefully by now you can deduce what this component's properties are made up of.
90- </description >
91- <property name =" target" local =" targetService" />
92- <property name =" interceptors" >
93- <list local =" securityInteceptor" />
94- </property >
95- </component >
1+ <?xml version =" 1.0" encoding =" UTF-8" ?>
2+ <components xmlns =" http://www.springframework.org/springpython/schema/components"
3+ xmlns : xsi =" http://www.w3.org/2001/XMLSchema-instance"
4+ xsi : schemaLocation =" http://www.springframework.org/springpython/schema/components
5+ http://springpython.webfactional.com/schema/context/spring-python-context-1.0.xsd" >
6+
7+ <description >
8+ This application context is used to show various components, defined using the
9+ code completion tools found in Eclipse, while pointed at an XSD spec.
10+
11+ Please note that this sample is used to show pycontainer's format, which is supported
12+ by the XSD spec.
13+ </description >
14+
15+ <description >You can have multiple descriptions at the root level.</description >
16+
17+ <component id =" user_details_service" class =" springpython.security.userdetails.InMemoryUserDetailsService" >
18+ <description >
19+ This is an in-memory list of users, with their password and roles. It is valuable
20+ for unit testing without interacting with the real user authentication subsystem.
21+
22+ The value between the property tags is run through a python evaluator, so it will
23+ translate the {...} text into a python dictionary with two entries.
24+ </description >
25+ <property name =" user_dict" >
26+ {
27+ "basicuser": ("password1", ["ROLE_BASIC"], True),
28+ "otheruser": ("password2", ["ROLE_OTHER"], True)
29+ }
30+ </property >
31+ </component >
32+
33+ <component id =" auth_provider" class =" springpython.security.providers.dao.DaoAuthenticationProvider" >
34+ <description >This component has a property which references another component by name.</description >
35+ <property name =" user_details_service" local =" user_details_service" />
36+ </component >
37+
38+ <component id =" auth_manager" class =" springpython.security.providers.AuthenticationManager" >
39+ <description >
40+ This component has a property that holds a list of values, and in this case, is
41+ loading the list with references to other components.
42+ </description >
43+ <property name =" auth_providers" >
44+ <list local =" auth_provider" />
45+ </property >
46+ </component >
47+
48+ <description >
49+ The following is a component with no properties.
50+
51+ NOTE: This description is not tied to the RoleVoter component.
52+ </description >
53+
54+ <component id =" roleVoter" class =" springpython.security.vote.RoleVoter" />
55+
56+ <component id =" access_decision_mgr" class =" springpython.security.vote.UnanimousBased" >
57+ <description >
58+ This component has a mix of properties.
59+
60+ The first property is evaluated as a python boolean False, NOT as a string of "False".
61+
62+ The second property is a list, and will contain one entry, a reference to the roleVoter
63+ component.
64+ </description >
65+ <property name =" allow_if_all_abstain" >False</property >
66+ <property name =" access_decision_voters" >
67+ <list local =" roleVoter" />
68+ </property >
69+ </component >
70+
71+ <component id =" securityInteceptor" class =" springpython.security.intercept.MethodSecurityInterceptor" >
72+ <property name =" validate_config_attributes" >False</property >
73+ <property name =" auth_manager" local =" auth_manager" />
74+ <property name =" access_decision_mgr" local =" access_decision_mgr" />
75+ <property name =" obj_def_source" >
76+ [
77+ ("springpythontest.support.testSecurityClasses.SampleService.get.*", ["ROLE_BASIC"]),
78+ ("springpythontest.support.testSecurityClasses.SampleService.do.*", ["ROLE_BASIC"]),
79+ ("springpythontest.support.testSecurityClasses.SampleService.update.*", ["ROLE_MGR"])
80+ ]
81+ </property >
82+ </component >
83+
84+ <description >This is another stand alone component</description >
85+ <component id =" targetService" class =" springpythontest.support.testSecurityClasses.SampleService" />
86+
87+ <component id =" sampleService" class =" springpython.aop.ProxyFactoryObject" >
88+ <description >
89+ Hopefully by now you can deduce what this component's properties are made up of.
90+ </description >
91+ <property name =" target" local =" targetService" />
92+ <property name =" interceptors" >
93+ <list local =" securityInteceptor" />
94+ </property >
95+ </component >
9696</components >
0 commit comments