|
1 | 1 | /*
|
2 |
| - * Copyright 2004, 2005, 2006 Acegi Technology Pty Limited |
| 2 | + * Copyright 2004, 2005, 2006, 2024 Acegi Technology Pty Limited |
3 | 3 | *
|
4 | 4 | * Licensed under the Apache License, Version 2.0 (the "License");
|
5 | 5 | * you may not use this file except in compliance with the License.
|
|
56 | 56 | *
|
57 | 57 | * @author Ben Alex
|
58 | 58 | * @author Scott Battaglia
|
| 59 | + * @author Kim Youngwoong |
59 | 60 | */
|
60 | 61 | public class CasAuthenticationProvider implements AuthenticationProvider, InitializingBean, MessageSourceAware {
|
61 | 62 |
|
62 | 63 | private static final Log logger = LogFactory.getLog(CasAuthenticationProvider.class);
|
63 | 64 |
|
64 | 65 | private AuthenticationUserDetailsService<CasAssertionAuthenticationToken> authenticationUserDetailsService;
|
65 | 66 |
|
66 |
| - private final UserDetailsChecker userDetailsChecker = new AccountStatusUserDetailsChecker(); |
| 67 | + private UserDetailsChecker userDetailsChecker = new AccountStatusUserDetailsChecker(); |
67 | 68 |
|
68 | 69 | protected MessageSourceAccessor messages = SpringSecurityMessageSource.getAccessor();
|
69 | 70 |
|
@@ -187,6 +188,16 @@ public void setAuthenticationUserDetailsService(
|
187 | 188 | this.authenticationUserDetailsService = authenticationUserDetailsService;
|
188 | 189 | }
|
189 | 190 |
|
| 191 | + /** |
| 192 | + * Sets the UserDetailsChecker to be used for checking the status of retrieved user details. |
| 193 | + * This allows customization of the UserDetailsChecker implementation. |
| 194 | + * |
| 195 | + * @param userDetailsChecker the UserDetailsChecker to be set |
| 196 | + */ |
| 197 | + public void setUserDetailsChecker(final UserDetailsChecker userDetailsChecker) { |
| 198 | + this.userDetailsChecker = userDetailsChecker; |
| 199 | + } |
| 200 | + |
190 | 201 | public void setServiceProperties(final ServiceProperties serviceProperties) {
|
191 | 202 | this.serviceProperties = serviceProperties;
|
192 | 203 | }
|
|
0 commit comments