Interface UserInfoProvider


  • public interface UserInfoProvider
    Provides basic information about the formcycle user profile of a user.
    Since:
    8.5.0
    Author:
    Norman Lorenz
    • Method Detail

      • getUserInfo

        Optional<UserInfo> getUserInfo​(AuthenticatedUser user)
                                throws FcIAMAccessException
        Returns information about the user profile of the given authenticated user.
        Parameters:
        user - the authenticated user
        Returns:
        the user information, or an empty optional if the user has no formcycle user profile, e.g. the super user or the virtual system user
        Throws:
        IllegalArgumentException - if the user is null
        FcIAMAccessException - if the user cannot be resolved, e.g. because the pac4j profile is missing
        Since:
        8.5.0
      • getUserInfoById

        Optional<UserInfo> getUserInfoById​(UserId userId)
        Returns information about the user profile with the given ID.
        Parameters:
        userId - the ID of the user profile
        Returns:
        the user information, or an empty optional if no user profile with the given ID exists
        Throws:
        IllegalArgumentException - if the user ID is null
        Since:
        8.5.0