List of usage examples for org.springframework.security.config.annotation.authentication.builders AuthenticationManagerBuilder eraseCredentials
Boolean eraseCredentials
To view the source code for org.springframework.security.config.annotation.authentication.builders AuthenticationManagerBuilder eraseCredentials.
Click Source Link
From source file:com.example.config.ApplicationSecurityConfig.java
@Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth.eraseCredentials(true).userDetailsService(customUserDetailsService).passwordEncoder(encoder); }
From source file:net.thewaffleshop.nimbus.security.SecurityConfig.java
@Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth /* we do not want to erase credentials after authentication; we need the credentials to be available * to the app in the auth callbacks */ .eraseCredentials(false).userDetailsService(userDetailsService).passwordEncoder(passwordEncoder); }
From source file:br.com.joaops.smt.configuration.SecurityConfig.java
@Override protected void configure(AuthenticationManagerBuilder auth) { auth.eraseCredentials(true); auth.authenticationProvider(authenticatorProvider); }
From source file:org.shaigor.rest.retro.client.config.ClientSecurityConfigurer.java
@Override public void configure(AuthenticationManagerBuilder auth) throws Exception { auth.eraseCredentials(false) // Credentials will be erased once OAuth token is obtained .jdbcAuthentication().dataSource(securityDataSource).rolePrefix("ROLE_") .groupAuthoritiesByUsername(groupAuthoritiesByUsernameSql) .passwordEncoder(new StandardPasswordEncoder()); }
From source file:com.xiovr.unibot.config.WebSecurityConfig.java
@Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { auth.authenticationProvider(getAuthenticationProvider()); auth.eraseCredentials(false); }
From source file:com.muk.spring.config.SpringSecurityConfig.java
@Override protected void configure(AuthenticationManagerBuilder auth) throws Exception { // Don't clear credentials from the authorization. This is our oauth access token auth.eraseCredentials(false); // Add custom provider for a bearer token auth.authenticationProvider(bearerTokenAuthenticationProvider()); // In memory users for basic auth final InMemoryUserDetailsManagerConfigurer<AuthenticationManagerBuilder> authBuilder = auth .inMemoryAuthentication();// w w w.j a v a 2s . c o m String decodedPrincipal = null; String[] principalParts = null; for (final String creds : environment.getProperty("app.principals").split(",")) { decodedPrincipal = new String(Base64.decodeBase64(creds)); principalParts = decodedPrincipal.split(":"); authBuilder.withUser(principalParts[0]).password(principalParts[1]).roles("USER"); } }