Class HttpBasicConfigurer<B extends HttpSecurityBuilder<B>>

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

    public final class HttpBasicConfigurer<B extends HttpSecurityBuilder<B>>
    extends AbstractHttpConfigurer<HttpBasicConfigurer<B>,​B>
    Adds HTTP basic based authentication. All attributes have reasonable defaults making all parameters are optional.

    Security Filters

    The following Filters are populated
    • BasicAuthenticationFilter

    Shared Objects Created

    Shared Objects Used

    The following shared objects are used:
    • AuthenticationManager
    • RememberMeServices
    Since:
    3.2
    • Method Detail

      • authenticationEntryPoint

        public HttpBasicConfigurer<B> authenticationEntryPoint​(org.springframework.security.web.AuthenticationEntryPoint authenticationEntryPoint)
        The AuthenticationEntryPoint to be populated on BasicAuthenticationFilter in the event that authentication fails. The default to use BasicAuthenticationEntryPoint with the realm "Realm".
        Parameters:
        authenticationEntryPoint - the AuthenticationEntryPoint to use
        Returns:
        HttpBasicConfigurer for additional customization
      • authenticationDetailsSource

        public HttpBasicConfigurer<B> authenticationDetailsSource​(org.springframework.security.authentication.AuthenticationDetailsSource<javax.servlet.http.HttpServletRequest,​?> authenticationDetailsSource)
        Specifies a custom AuthenticationDetailsSource to use for basic authentication. The default is WebAuthenticationDetailsSource.
        Parameters:
        authenticationDetailsSource - the custom AuthenticationDetailsSource to use
        Returns:
        HttpBasicConfigurer for additional customization