Package org.flowable.common.engine.api.identity

# Interface AuthenticationContext

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 Type
  Method
  Description
  `String`
  `getAuthenticatedUserId()`
  The user id of the authenticated principal.
  `Principal`
  `getPrincipal()`
  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` or `null` if no principal information is available

  - ### setPrincipal

    void setPrincipal(Principal principal)
    Changes the currently authenticated principal, or removes the authentication information.
    Parameters:
      `principal` - the new `Authentication` token, or `null` if no further principal information should be stored