Class ServerHttpSecurity.FormLoginSpec

    • Method Detail

      • authenticationSuccessHandler

        public ServerHttpSecurity.FormLoginSpec authenticationSuccessHandler​(org.springframework.security.web.server.authentication.ServerAuthenticationSuccessHandler authenticationSuccessHandler)
        The ServerAuthenticationSuccessHandler used after authentication success. Defaults to RedirectServerAuthenticationSuccessHandler.
        Parameters:
        authenticationSuccessHandler - the success handler to use
        Returns:
        the ServerHttpSecurity.FormLoginSpec to continue configuring
      • authenticationEntryPoint

        public ServerHttpSecurity.FormLoginSpec authenticationEntryPoint​(org.springframework.security.web.server.ServerAuthenticationEntryPoint authenticationEntryPoint)
        How to request for authentication. The default is that Spring Security will generate a log in page at "/login".
        Parameters:
        authenticationEntryPoint - the entry point to use
        Returns:
        the ServerHttpSecurity.FormLoginSpec to continue configuring
        See Also:
        loginPage(String)
      • requiresAuthenticationMatcher

        public ServerHttpSecurity.FormLoginSpec requiresAuthenticationMatcher​(org.springframework.security.web.server.util.matcher.ServerWebExchangeMatcher requiresAuthenticationMatcher)
        Configures when authentication is performed. The default is a POST to "/login".
        Parameters:
        requiresAuthenticationMatcher - the matcher to use
        Returns:
        the ServerHttpSecurity.FormLoginSpec to continue configuring
        See Also:
        loginPage(String)
      • authenticationFailureHandler

        public ServerHttpSecurity.FormLoginSpec authenticationFailureHandler​(org.springframework.security.web.server.authentication.ServerAuthenticationFailureHandler authenticationFailureHandler)
        Configures how a failed authentication is handled. The default is to redirect to "/login?error".
        Parameters:
        authenticationFailureHandler - the handler to use
        Returns:
        the ServerHttpSecurity.FormLoginSpec to continue configuring
        See Also:
        loginPage(String)
      • securityContextRepository

        public ServerHttpSecurity.FormLoginSpec securityContextRepository​(org.springframework.security.web.server.context.ServerSecurityContextRepository securityContextRepository)
        The ServerSecurityContextRepository used to save the Authentication. Defaults to WebSessionServerSecurityContextRepository. For the SecurityContext to be loaded on subsequent requests the ReactorContextWebFilter must be configured to be able to load the value (they are not implicitly linked).
        Parameters:
        securityContextRepository - the repository to use
        Returns:
        the ServerHttpSecurity.FormLoginSpec to continue configuring