Class OpenIDLoginConfigurer<H extends HttpSecurityBuilder<H>>

  • All Implemented Interfaces:
    SecurityConfigurer<org.springframework.security.web.DefaultSecurityFilterChain,​H>

    @Deprecated
    public final class OpenIDLoginConfigurer<H extends HttpSecurityBuilder<H>>
    extends AbstractAuthenticationFilterConfigurer<H,​OpenIDLoginConfigurer<H>,​org.springframework.security.openid.OpenIDAuthenticationFilter>
    Deprecated.
    The OpenID 1.0 and 2.0 protocols have been deprecated and users are encouraged to migrate to OpenID Connect, which is supported by spring-security-oauth2.
    Adds support for OpenID based authentication.

    Example Configuration

    
     @Configuration
     @EnableWebSecurity
     public class OpenIDLoginConfig extends WebSecurityConfigurerAdapter {
    
            @Override
            protected void configure(HttpSecurity http) {
                    http
                            .authorizeRequests()
                                    .antMatchers("/**").hasRole("USER")
                                    .and()
                            .openidLogin()
                                    .permitAll();
            }
    
            @Override
            protected void configure(AuthenticationManagerBuilder auth)(
                            AuthenticationManagerBuilder auth) throws Exception {
                    auth
                            .inMemoryAuthentication()
                                    .withUser("https://www.google.com/accounts/o8/id?id=lmkCn9xzPdsxVwG7pjYMuDgNNdASFmobNkcRPaWU")
                                            .password("password")
                                            .roles("USER");
            }
     }
     

    Security Filters

    The following Filters are populated
    • OpenIDAuthenticationFilter

    Shared Objects Created

    Shared Objects Used

    The following shared objects are used:
    Since:
    3.2