Class OAuth2UserInfo

  • All Implemented Interfaces:
    UserInfo

    public class OAuth2UserInfo
    extends Object
    implements UserInfo
    Information about the current user.
    • Constructor Detail

      • OAuth2UserInfo

        protected OAuth2UserInfo​(String authenticationIdKey,
                                 JsonValue rawProfile)
        Creates an OAuth2UserInfo object which wraps the raw profile of a user and provides the Subject of a particular user.
        Parameters:
        authenticationIdKey - key used to identify which attribute an auth server identifies a user by.
        rawProfile - users profile that was retrieved from the resource server.
    • Method Detail

      • getSubject

        public String getSubject()
        Description copied from interface: UserInfo
        The subject which identifies a user on a particular auth server.
        Specified by:
        getSubject in interface UserInfo
        Returns:
        subject.
      • getRawProfile

        public JsonValue getRawProfile()
        Description copied from interface: UserInfo
        Gets the user raw profile data without any modifications that was returned by the auth server.
        Specified by:
        getRawProfile in interface UserInfo
        Returns:
        users information as a JsonValue.