Interface IAuthenticationService


public interface IAuthenticationService
Service for authenticating users using different IAuthentication implementations.
  • Method Summary

    Modifier and Type
    Method
    Description
    authenticate(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, SagaLogin sagaLogin, Class<? extends IAuthentication> guard)
    Authenticate user against the given authentication guard using the given login credentials.
    void
    signOut(jakarta.servlet.http.HttpServletRequest request, jakarta.servlet.http.HttpServletResponse response, Class<? extends IAuthentication> guard)
    Invalidate the current session for the given guard.
  • Method Details

    • authenticate

      Optional<User> authenticate(@Nonnull jakarta.servlet.http.HttpServletRequest request, @Nonnull jakarta.servlet.http.HttpServletResponse response, @Nonnull SagaLogin sagaLogin, @Nonnull Class<? extends IAuthentication> guard)
      Authenticate user against the given authentication guard using the given login credentials.
      Parameters:
      request - Http request.
      response - Http response.
      guard - Authentication to use for guard.
      sagaLogin - Login credentials to use.
      Returns:
      Optional of User if guard was successful, empty otherwise.
    • signOut

      void signOut(@Nonnull jakarta.servlet.http.HttpServletRequest request, @Nonnull jakarta.servlet.http.HttpServletResponse response, @Nonnull Class<? extends IAuthentication> guard)
      Invalidate the current session for the given guard.
      Parameters:
      guard - Authentication to use for guard.