Interface AuthenticationContext
- All Known Implementing Classes:
SpringSecurityAuthenticationContext
,UserIdAuthenticationContext
public interface AuthenticationContext
Flowable Authentication context that can be implemented in different ways to hold and store the current authentication information.
- Author:
- Filip Hrisafov
-
Method Summary
Modifier and TypeMethodDescriptionThe user id of the authenticated principal.Obtains the currently authenticated principal, or an authentication request token.void
setPrincipal
(Principal principal) Changes the currently authenticated principal, or removes the authentication information.
-
Method Details
-
getAuthenticatedUserId
String getAuthenticatedUserId()The user id of the authenticated principal.- Returns:
- the id of the authenticated user
-
getPrincipal
Principal getPrincipal()Obtains the currently authenticated principal, or an authentication request token.- Returns:
- the
Principal
ornull
if no principal information is available
-
setPrincipal
Changes the currently authenticated principal, or removes the authentication information.- Parameters:
principal
- the newAuthentication
token, ornull
if no further principal information should be stored
-