Interface VaadinAuthenticationService

    • Method Detail

      • login

        void login​(com.vaadin.flow.component.Component commComponent,
                   String username,
                   String password,
                   boolean rememberMe,
                   AuthenticationResultHandler handler)
        Performs the authentication attempt against Spring Security and call the provided handler with the result.

        The provided commComponent used for communication with the client-side must be enabled. So don't pass in a LoginForm or a Button with "disable on click".

        Parameters:
        commComponent - any component in the login view that will be used for communication with the client-side; the component must be attached and enabled
        username - the user name
        password - the password
        rememberMe - whether remember-me should be used
        handler - the handler that will be notified with the result once the login attempt has completed; may be null
      • logout

        default void logout()
        Logs out the current user. This method must be called from a request handling thread.
        See Also:
        logout(Component)
      • logout

        void logout​(com.vaadin.flow.component.Component commComponent)
        Logs out the user associated with the UI of the given component. Affects all UIs in the user's session, not just the provided one.
        Parameters:
        commComponent - any attached component from your UI or the UI itself