Class RefreshableUser

java.lang.Object
io.fluxzero.sdk.tracking.handling.authentication.RefreshableUser

public class RefreshableUser extends Object
Mutable holder for a previously resolved user that may be refreshed while handling a message.

The holder itself is kept stable in message context while the contained user can be replaced by a refresh-capable UserProvider. This lets authorization, User.getCurrent(), and User parameter resolution see the same refreshed user during a single handling flow.

  • Constructor Details

    • RefreshableUser

      public RefreshableUser(User user)
      Creates a holder for a previously resolved user.
      Parameters:
      user - the initial user
  • Method Details

    • user

      public User user()
      Returns the current user.
      Returns:
      the current user, or null if no authenticated user is available
    • update

      public User update(User user)
      Replaces the current user.
      Parameters:
      user - the refreshed user
      Returns:
      the refreshed user