Class StandardAuthenticationService

java.lang.Object
de.codecamp.vaadin.security.spring.authentication.StandardAuthenticationService
All Implemented Interfaces:
VaadinAuthenticationService

public class StandardAuthenticationService extends Object implements VaadinAuthenticationService
  • Constructor Details

    • StandardAuthenticationService

      public StandardAuthenticationService()
  • Method Details

    • setLoginProcessingClientUrl

      public void setLoginProcessingClientUrl(String loginProcessingClientUrl)
    • setLogoutProcessingClientUrl

      public void setLogoutProcessingClientUrl(String logoutProcessingClientUrl)
    • setAuthenticationResultHandlers

      public void setAuthenticationResultHandlers(List<AuthenticationResultHandler> authenticationResultHandlers)
    • login

      public void login(com.vaadin.flow.component.Component commComponent, String username, String password, boolean rememberMe, AuthenticationResultHandler primaryHandler)
      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; only has an effect when that feature is actually activated
      primaryHandler - the handler that will be notified first with the result once the login attempt has completed; may be null
    • logout

      public void logout(com.vaadin.flow.component.Component commComponent)
      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:
      commComponent - any attached component from your UI or the UI itself