Class Identity


  • public final class Identity
    extends java.lang.Object
    This class is representation of User Auth Identity, that is used by GetSocial framework to identify user and to manage his accounts.
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static Identity custom​(java.lang.String customProviderName, java.lang.String userId, java.lang.String accessToken)
      Create custom identity.
      boolean equals​(java.lang.Object other)  
      static Identity facebook​(java.lang.String accessToken)
      Creates a Facebook identity with specified access token.
      java.lang.String getAccessToken()  
      java.lang.String getProviderId()  
      java.lang.String getProviderUserId()  
      int hashCode()  
      java.lang.String toString()  
      static Identity trusted​(java.lang.String customProviderName, java.lang.String accessToken)
      Create trusted identity.
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • facebook

        public static Identity facebook​(java.lang.String accessToken)
        Creates a Facebook identity with specified access token.
        Parameters:
        accessToken - Token of Facebook user returned from FB SDK.
        Returns:
        An instance of Identity for Facebook user with specified access token.
      • custom

        public static Identity custom​(java.lang.String customProviderName,
                                      java.lang.String userId,
                                      java.lang.String accessToken)
        Create custom identity.
        Parameters:
        customProviderName - Your custom provider name.
        userId - Unique user identifier for your custom provider.
        accessToken - Password of the user for your custom provider. It's a string, provided by the developer and it will be required by the GetSocial SDK to validate any future intent to add this same identity to another user.
        Returns:
        An instance of Identity for your custom provider.
      • trusted

        public static Identity trusted​(java.lang.String customProviderName,
                                       java.lang.String accessToken)
        Create trusted identity.
        Parameters:
        customProviderName - Your custom provider name.
        accessToken - Password of the user for your custom provider. It's a string, provided by the developer and it will be required by the GetSocial SDK to validate any future intent to add this same identity to another user.
        Returns:
        An instance of Identity for your custom provider.
      • getProviderUserId

        public java.lang.String getProviderUserId()
      • getAccessToken

        public java.lang.String getAccessToken()
      • getProviderId

        public java.lang.String getProviderId()
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object other)
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.lang.Object