Java Code Examples for org.springframework.security.cas.authentication.CasAuthenticationProvider#setKey()
The following examples show how to use
org.springframework.security.cas.authentication.CasAuthenticationProvider#setKey() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SpringWebConfig.java From we-cmdb with Apache License 2.0 | 5 votes |
@Bean public CasAuthenticationProvider casAuthenticationProvider() { CasAuthenticationProvider provider = new CasAuthenticationProvider(); provider.setTicketValidator(new Cas20ServiceTicketValidator(securityProperties.getCasServerUrl())); provider.setServiceProperties(serviceProperties()); provider.setKey("casAuthProviderKey"); provider.setUserDetailsService(userDetailsService); return provider; }
Example 2
Source File: WebSecurityConfig.java From dubbo-postman with MIT License | 5 votes |
public CasAuthenticationProvider casAuthenticationProvider() { CasAuthenticationProvider provider = new CasAuthenticationProvider(); provider.setTicketValidator(cas20ServiceTicketValidator()); provider.setServiceProperties(serviceProperties()); provider.setKey("an_id_for_this_auth_provider_only"); provider.setAuthenticationUserDetailsService(userDetailsByNameServiceWrapper()); return provider; }
Example 3
Source File: CasConfiguration.java From cymbal with Apache License 2.0 | 5 votes |
@Bean public CasAuthenticationProvider casAuthenticationProvider(CasUserDetailService casUserDetailService, ServiceProperties serviceProperties, Cas20ServiceTicketValidator ticketValidator) { CasAuthenticationProvider provider = new CasAuthenticationProvider(); provider.setKey("casProvider"); provider.setServiceProperties(serviceProperties); provider.setTicketValidator(ticketValidator); provider.setAuthenticationUserDetailsService(casUserDetailService); return provider; }
Example 4
Source File: SecurityConfiguration.java From cymbal with Apache License 2.0 | 5 votes |
@Bean public CasAuthenticationProvider casAuthenticationProvider(final CasUserDetailService casUserDetailService, final ServiceProperties serviceProperties, final Cas20ServiceTicketValidator ticketValidator) { CasAuthenticationProvider provider = new CasAuthenticationProvider(); provider.setKey("casProvider"); provider.setServiceProperties(serviceProperties); provider.setTicketValidator(ticketValidator); provider.setAuthenticationUserDetailsService(casUserDetailService); return provider; }
Example 5
Source File: CasConfig.java From Spring-Security-Third-Edition with MIT License | 5 votes |
@Bean public CasAuthenticationProvider casAuthenticationProvider() { CasAuthenticationProvider cap = new CasAuthenticationProvider(); cap.setTicketValidator(ticketValidator()); cap.setServiceProperties(serviceProperties()); cap.setKey("casJbcpCalendar"); cap.setAuthenticationUserDetailsService(userDetailsByNameServiceWrapper); cap.setStatelessTicketCache(ehCacheBasedTicketCache()); return cap; }
Example 6
Source File: CasConfig.java From Spring-Security-Third-Edition with MIT License | 5 votes |
@Bean public CasAuthenticationProvider casAuthenticationProvider() { CasAuthenticationProvider cap = new CasAuthenticationProvider(); cap.setTicketValidator(ticketValidator()); cap.setServiceProperties(serviceProperties()); cap.setKey("casJbcpCalendar"); cap.setAuthenticationUserDetailsService(userDetailsByNameServiceWrapper); cap.setStatelessTicketCache(ehCacheBasedTicketCache()); return cap; }
Example 7
Source File: CasConfig.java From Spring-Security-Third-Edition with MIT License | 5 votes |
@Bean public CasAuthenticationProvider casAuthenticationProvider() { CasAuthenticationProvider cap = new CasAuthenticationProvider(); cap.setTicketValidator(ticketValidator()); cap.setServiceProperties(serviceProperties()); cap.setKey("casJbcpCalendar"); cap.setAuthenticationUserDetailsService(userDetailsByNameServiceWrapper); cap.setStatelessTicketCache(ehCacheBasedTicketCache()); return cap; }
Example 8
Source File: CasSsoContextConfig.java From onetwo with Apache License 2.0 | 5 votes |
@Bean @ConditionalOnMissingBean(CasAuthenticationProvider.class) public CasAuthenticationProvider casAuthenticationProvider(){ CasAuthenticationProvider casProvider = new CasAuthenticationProvider(); casProvider.setAuthenticationUserDetailsService(new UserDetailsByNameServiceWrapper<>(userDetailsService)); casProvider.setServiceProperties(serviceProperties()); casProvider.setTicketValidator(new Cas20ServiceTicketValidator(bootSecurityConfig.getCas().getCasServerUrl())); casProvider.setKey(bootSecurityConfig.getCas().getKey()); return casProvider; }
Example 9
Source File: CasSecuredApplication.java From tutorials with MIT License | 5 votes |
@Bean public CasAuthenticationProvider casAuthenticationProvider( TicketValidator ticketValidator, ServiceProperties serviceProperties) { CasAuthenticationProvider provider = new CasAuthenticationProvider(); provider.setServiceProperties(serviceProperties); provider.setTicketValidator(ticketValidator); provider.setUserDetailsService( s -> new User("[email protected]", "Mellon", true, true, true, true, AuthorityUtils.createAuthorityList("ROLE_ADMIN"))); provider.setKey("CAS_PROVIDER_LOCALHOST_8900"); return provider; }