Class UserIdentity


  • @Immutable
    public final class UserIdentity
    extends java.lang.Object
    User information provided by the Identity Provider to be register into the platform.
    Since:
    5.4
    • Method Detail

      • getProviderId

        @CheckForNull
        public java.lang.String getProviderId()
        Optional unique ID for the related IdentityProvider. If two IdentityProvider define two users with the same ID, then users are considered as identical. When the ID is not provided, the provider login getProviderLogin() is used.
        Since:
        7.2
      • getProviderLogin

        public java.lang.String getProviderLogin()
        Non-blank user login for the related IdentityProvider.
      • getLogin

        @CheckForNull
        @Deprecated
        public java.lang.String getLogin()
        Deprecated.
        since 8.0, should not be used as it is internal managed field
        User login, unique for the SonarQube platform. If two IdentityProvider define two users with the same login, then users are considered as identical. Since 7.4, a unique login will be generated if result is null and the user referenced by getProviderId() or getProviderLogin() does not already exist.
        Returns:
        null
      • getName

        public java.lang.String getName()
        Non-blank display name. Uniqueness is not mandatory, even it's recommended for easier search of users in webapp.
      • getEmail

        @CheckForNull
        public java.lang.String getEmail()
        Optional non-blank email. If defined, then it must be unique among all the users defined by all IdentityProvider. If not unique, then authentication will fail.
      • shouldSyncGroups

        public boolean shouldSyncGroups()
        Return true if groups should be synchronized for this user.
        Since:
        5.5
      • getGroups

        public java.util.Set<java.lang.String> getGroups()
        List of group membership of the user. Only existing groups in SonarQube will be synchronized.
        Since:
        5.5