public class SpringSocialConfigurer
extends org.springframework.security.config.annotation.SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,org.springframework.security.config.annotation.web.builders.HttpSecurity>
SocialAuthenticationFilter to Spring Security's filter chain.
Used with Spring Security 3.2's Java-based configuration support, when overriding WebSecurityConfigurerAdapter#configure(HttpSecurity):
protected void configure(HttpSecurity http) throws Exception {
http.
// HTTP security configuration details snipped
.and()
.apply(new SpringSocialHttpConfigurer());
}
| Constructor and Description |
|---|
SpringSocialConfigurer()
Constructs a SpringSocialHttpConfigurer.
|
| Modifier and Type | Method and Description |
|---|---|
void |
configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http) |
SpringSocialConfigurer |
userIdSource(UserIdSource userIdSource)
Sets the
UserIdSource to use for authentication. |
public SpringSocialConfigurer()
UsersConnectionRepository, SocialAuthenticationServiceLocator, and
SocialUserDetailsService beans be available in the application context.public void configure(org.springframework.security.config.annotation.web.builders.HttpSecurity http)
throws Exception
configure in interface org.springframework.security.config.annotation.SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,org.springframework.security.config.annotation.web.builders.HttpSecurity>configure in class org.springframework.security.config.annotation.SecurityConfigurerAdapter<org.springframework.security.web.DefaultSecurityFilterChain,org.springframework.security.config.annotation.web.builders.HttpSecurity>Exceptionpublic SpringSocialConfigurer userIdSource(UserIdSource userIdSource)
UserIdSource to use for authentication. Defaults to AuthenticationNameUserIdSource.