@@ -47,33 +47,33 @@ def userDetailsService2(self):
47
47
48
48
@Object
49
49
def plainEncoder (self ):
50
- return PlaintextPasswordEncoder ()
50
+ return PlaintextPasswordEncoder ()
51
51
52
52
@Object
53
53
def plainAuthenticationProvider (self ):
54
54
provider = DaoAuthenticationProvider ()
55
55
provider .user_details_service = self .userDetailsService2 ()
56
56
provider .password_encoder = self .plainEncoder ()
57
57
return provider
58
-
58
+
59
59
60
60
@Object
61
61
def authenticationManager (self ):
62
62
manager = AuthenticationManager ()
63
63
manager .auth_providers = [self .plainAuthenticationProvider ()]
64
64
return manager
65
-
65
+
66
66
@Object
67
67
def authenticationProcessingFilter (self ):
68
68
filter = AuthenticationProcessingFilter ()
69
69
filter .auth_manager = self .authenticationManager ()
70
70
filter .alwaysReauthenticate = False
71
71
return filter
72
-
72
+
73
73
@Object
74
74
def cherrypySessionStrategy (self ):
75
75
return CP3SessionStrategy ()
76
-
76
+
77
77
@Object
78
78
def redirectStrategy (self ):
79
79
return CP3RedirectStrategy ()
@@ -89,20 +89,20 @@ def authenticationProcessingFilterEntryPoint(self):
89
89
filter_point = AuthenticationProcessingFilterEntryPoint ()
90
90
filter_point .loginFormUrl = "/login"
91
91
filter_point .redirectStrategy = self .redirectStrategy ()
92
- return filter_point
92
+ return filter_point
93
93
@Object
94
94
def accessDeniedHandler (self ):
95
95
handler = SimpleAccessDeniedHandler ()
96
96
handler .errorPage = "/accessDenied"
97
97
handler .redirectStrategy = self .redirectStrategy ()
98
- return handler
98
+ return handler
99
99
100
100
@Object
101
101
def exceptionTranslationFilter (self ):
102
102
filter = ExceptionTranslationFilter ()
103
103
filter .authenticationEntryPoint = self .authenticationProcessingFilterEntryPoint ()
104
104
filter .accessDeniedHandler = self .accessDeniedHandler ()
105
- return filter
105
+ return filter
106
106
107
107
@Object
108
108
def filterSecurityInterceptor (self ):
@@ -112,13 +112,13 @@ def filterSecurityInterceptor(self):
112
112
interceptor .access_decision_mgr = self .accessDecisionManager ()
113
113
interceptor .sessionStrategy = self .cherrypySessionStrategy ()
114
114
interceptor .obj_def_source = [("/.*" , ["VET_ANY" , "CUSTOMER_ANY" ])]
115
- return interceptor
115
+ return interceptor
116
116
117
117
@Object
118
118
def vetRoleVoter (self ):
119
119
voter = RoleVoter ()
120
120
voter .role_prefix = "VET"
121
- return voter
121
+ return voter
122
122
123
123
@Object
124
124
def customerRoleVoter (self ):
@@ -131,7 +131,7 @@ def accessDecisionManager(self):
131
131
policy = AffirmativeBased ()
132
132
policy .allow_if_all_abstain = False
133
133
policy .access_decision_voters = [self .vetRoleVoter (), self .customerRoleVoter ()]
134
- return policy
134
+ return policy
135
135
136
136
@Object
137
137
def filterChainProxy (self ):
@@ -145,7 +145,7 @@ def filterChainProxy(self):
145
145
"authenticationProcessingFilter" ,
146
146
"filterSecurityInterceptor" ]
147
147
)]
148
- return proxy
148
+ return proxy
149
149
150
150
@Object
151
151
def loginForm (self ):
@@ -155,5 +155,5 @@ def loginForm(self):
155
155
form .authenticationManager = self .authenticationManager ()
156
156
form .redirectStrategy = self .redirectStrategy ()
157
157
form .httpContextFilter = self .httpContextFilter ()
158
- return form
158
+ return form
159
159
0 commit comments