org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationProvider Java Examples
The following examples show how to use
org.springframework.security.web.authentication.preauth.PreAuthenticatedAuthenticationProvider.
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: AuthorizationServerConfig.java From oauth-server with Apache License 2.0 | 5 votes |
private void addUserDetailsService(CustomTokenService tokenServices, UserDetailsService userDetailsService) { if (userDetailsService != null) { PreAuthenticatedAuthenticationProvider provider = new PreAuthenticatedAuthenticationProvider(); provider.setPreAuthenticatedUserDetailsService(new UserDetailsByNameServiceWrapper<>( userDetailsService)); tokenServices.setAuthenticationManager(new ProviderManager(Arrays.asList(provider))); } }
Example #2
Source File: MockServerConfig.java From bearchoke with Apache License 2.0 | 5 votes |
@Bean(name = "preAuthAuthenticationManager") public AuthenticationManager preAuthAuthenticationManager() { PreAuthenticatedAuthenticationProvider preAuthProvider = new PreAuthenticatedAuthenticationProvider(); preAuthProvider.setPreAuthenticatedUserDetailsService(preAuthUserDetailsService()); return new ProviderManager(Arrays.asList(preAuthProvider)); }
Example #3
Source File: SecurityConfig.java From bearchoke with Apache License 2.0 | 5 votes |
@Bean(name = "preAuthAuthenticationManager") public AuthenticationManager preAuthAuthenticationManager() { PreAuthenticatedAuthenticationProvider preAuthProvider = new PreAuthenticatedAuthenticationProvider(); preAuthProvider.setPreAuthenticatedUserDetailsService(preAuthUserDetailsService); List<AuthenticationProvider> providers = new ArrayList<AuthenticationProvider>(); providers.add(preAuthProvider); return new ProviderManager(providers); }
Example #4
Source File: WebAnnoSecurity.java From webanno with Apache License 2.0 | 5 votes |
@Bean(name = "authenticationProvider") @Profile("auto-mode-preauth") public PreAuthenticatedAuthenticationProvider externalAuthenticationProvider() { PreAuthenticatedAuthenticationProvider authProvider = new PreAuthenticatedAuthenticationProvider(); authProvider.setPreAuthenticatedUserDetailsService( new UserDetailsByNameServiceWrapper<PreAuthenticatedAuthenticationToken>( userDetailsService())); return authProvider; }
Example #5
Source File: AppSpringModuleConfig.java From herd with Apache License 2.0 | 5 votes |
@Bean @Override public AuthenticationManager authenticationManager() { PreAuthenticatedAuthenticationProvider authenticationProvider = new PreAuthenticatedAuthenticationProvider(); authenticationProvider.setPreAuthenticatedUserDetailsService(herdUserDetailsService); List<AuthenticationProvider> providers = new ArrayList<>(); providers.add(authenticationProvider); return new ProviderManager(providers); }
Example #6
Source File: SecurityConfig.java From Spring-Security-Third-Edition with MIT License | 5 votes |
@Bean public PreAuthenticatedAuthenticationProvider preAuthAuthenticationProvider( // final AuthenticationUserDetailsService<PreAuthenticatedAuthenticationToken> authenticationUserDetailsService) final AuthenticationUserDetailsService authenticationUserDetailsService) { return new PreAuthenticatedAuthenticationProvider(){{ setPreAuthenticatedUserDetailsService(authenticationUserDetailsService); }}; }
Example #7
Source File: InceptionSecurity.java From inception with Apache License 2.0 | 5 votes |
@Bean(name = "authenticationProvider") @Profile("auto-mode-preauth") public PreAuthenticatedAuthenticationProvider externalAuthenticationProvider() { PreAuthenticatedAuthenticationProvider authProvider = new PreAuthenticatedAuthenticationProvider(); authProvider.setPreAuthenticatedUserDetailsService( new UserDetailsByNameServiceWrapper<PreAuthenticatedAuthenticationToken>( userDetailsService())); return authProvider; }
Example #8
Source File: SecurityConfig.java From Spring-Security-Third-Edition with MIT License | 4 votes |
@Bean public PreAuthenticatedAuthenticationProvider preAuthAuthenticationProvider(final AuthenticationUserDetailsService authenticationUserDetailsService){ return new PreAuthenticatedAuthenticationProvider(){{ setPreAuthenticatedUserDetailsService(authenticationUserDetailsService); }}; }
Example #9
Source File: SecurityConfig.java From Spring-Security-Third-Edition with MIT License | 4 votes |
@Bean public PreAuthenticatedAuthenticationProvider preAuthAuthenticationProvider(final AuthenticationUserDetailsService authenticationUserDetailsService){ return new PreAuthenticatedAuthenticationProvider(){{ setPreAuthenticatedUserDetailsService(authenticationUserDetailsService); }}; }
Example #10
Source File: SecurityConfig.java From Spring-Security-Third-Edition with MIT License | 4 votes |
@Bean public PreAuthenticatedAuthenticationProvider preAuthAuthenticationProvider(final AuthenticationUserDetailsService authenticationUserDetailsService){ return new PreAuthenticatedAuthenticationProvider(){{ setPreAuthenticatedUserDetailsService(authenticationUserDetailsService); }}; }
Example #11
Source File: WebSecurityConfiguration.java From todolist with MIT License | 4 votes |
@Bean PreAuthenticatedAuthenticationProvider preAuthenticationProvider() { PreAuthenticatedAuthenticationProvider provider = new PreAuthenticatedAuthenticationProvider(); provider.setPreAuthenticatedUserDetailsService(apiDetailsService()); return provider; }
Example #12
Source File: WebSecurityConfig.java From training with MIT License | 4 votes |
@Bean public AuthenticationProvider preAuthenticatedProvider() { PreAuthenticatedAuthenticationProvider provider = new PreAuthenticatedAuthenticationProvider(); provider.setPreAuthenticatedUserDetailsService(preauthUserDetailsService()); return provider; }
Example #13
Source File: SecurityConfig.java From Spring-Security-Third-Edition with MIT License | 4 votes |
@Bean public PreAuthenticatedAuthenticationProvider preAuthAuthenticationProvider(final AuthenticationUserDetailsService authenticationUserDetailsService){ return new PreAuthenticatedAuthenticationProvider(){{ setPreAuthenticatedUserDetailsService(authenticationUserDetailsService); }}; }
Example #14
Source File: SecurityConfiguration.java From syndesis with Apache License 2.0 | 4 votes |
private static AuthenticationProvider authenticationProvider() { PreAuthenticatedAuthenticationProvider authProvider = new PreAuthenticatedAuthenticationProvider(); authProvider.setPreAuthenticatedUserDetailsService(new PreAuthenticatedGrantedAuthoritiesUserDetailsService()); return authProvider; }
Example #15
Source File: TokenConfig.java From mall4j with GNU Affero General Public License v3.0 | 4 votes |
private void addUserDetailsService(YamiTokenServices tokenServices) { PreAuthenticatedAuthenticationProvider provider = new PreAuthenticatedAuthenticationProvider(); provider.setPreAuthenticatedUserDetailsService(new UserDetailsByNameServiceWrapper<>(userDetailsService)); tokenServices.setAuthenticationManager(new ProviderManager(Collections.singletonList(provider))); }
Example #16
Source File: SecurityConfig.java From cloudbreak with Apache License 2.0 | 4 votes |
@Bean public PreAuthenticatedAuthenticationProvider preAuthAuthProvider() throws Exception { PreAuthenticatedAuthenticationProvider provider = new PreAuthenticatedAuthenticationProvider(); provider.setPreAuthenticatedUserDetailsService(userDetailsServiceWrapper()); return provider; }
Example #17
Source File: SecurityConfig.java From cloudbreak with Apache License 2.0 | 4 votes |
@Bean public PreAuthenticatedAuthenticationProvider preAuthAuthProvider() throws Exception { PreAuthenticatedAuthenticationProvider provider = new PreAuthenticatedAuthenticationProvider(); provider.setPreAuthenticatedUserDetailsService(userDetailsServiceWrapper()); return provider; }