Class DefaultVaadinAuthenticationService

    • Constructor Detail

      • DefaultVaadinAuthenticationService

        public DefaultVaadinAuthenticationService()
    • Method Detail

      • setLoginProcessingUrl

        public void setLoginProcessingUrl​(String loginProcessingUrl)
      • setLogoutUrl

        public void setLogoutUrl​(String logoutUrl)
      • login

        public void login​(com.vaadin.flow.component.Component commComponent,
                          String username,
                          String password,
                          boolean rememberMe,
                          AuthenticationResultHandler handler)
        Description copied from interface: VaadinAuthenticationService
        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".

        Specified by:
        login in interface VaadinAuthenticationService
        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

        public void logout​(com.vaadin.flow.component.Component component)
        Description copied from interface: VaadinAuthenticationService
        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.
        Specified by:
        logout in interface VaadinAuthenticationService
        Parameters:
        component - any attached component from your UI or the UI itself