Interface IAuthenticationService
public interface IAuthenticationService
Service for authenticating users using different
IAuthentication implementations.-
Method Summary
Modifier and TypeMethodDescriptionauthenticate(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.voidsignOut()voidsignOut(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
Invalidate the current session for the given guard.- Parameters:
guard- Authentication to use for guard.
-
signOut
void signOut()
-