Show / Hide Table of Contents

    Class Credentials

    A class, representing the credentials used for authenticating a User.

    Inheritance
    Object
    Credentials
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace:Realms.Sync
    Assembly:Realm.Sync.dll
    Syntax
    public class Credentials

    Properties

    | Improve this Doc View Source

    IdentityProvider

    Gets the identity provider for the credentials.

    Declaration
    public string IdentityProvider { get; }
    Property Value
    Type Description
    String

    The identity provider, such as Google, Facebook, etc.

    | Improve this Doc View Source

    Token

    Gets the access token.

    Declaration
    public string Token { get; }
    Property Value
    Type Description
    String

    The access token.

    | Improve this Doc View Source

    UserInfo

    Gets additional user information associated with the credentials.

    Declaration
    public IReadOnlyDictionary<string, object> UserInfo { get; }
    Property Value
    Type Description
    IReadOnlyDictionary<String, Object>

    A dictionary, containing the additional information.

    Methods

    | Improve this Doc View Source

    AzureAD(String)

    Creates Credentials based on an Active Directory login.

    Declaration
    public static Credentials AzureAD(string adToken)
    Parameters
    Type Name Description
    String adToken

    An access token, obtained by logging into Azure Active Directory.

    Returns
    Type Description
    Credentials

    An instance of Credentials that can be used in LoginAsync(Credentials, Uri)

    | Improve this Doc View Source

    Custom(String, String, IDictionary<String, Object>)

    Creates an instance of Credentials with a custom provider and user identifier.

    Declaration
    public static Credentials Custom(string identityProvider, string userIdentifier, IDictionary<string, object> userInfo)
    Parameters
    Type Name Description
    String identityProvider

    Provider used to verify the credentials.

    String userIdentifier

    String identifying the user. Usually a username of id.

    IDictionary<String, Object> userInfo

    Data describing the user further or null if the user does not have any extra data. The data will be serialized to JSON, so all values must be mappable to a valid JSON data type.

    Returns
    Type Description
    Credentials

    An instance of Credentials that can be used in LoginAsync(Credentials, Uri)

    | Improve this Doc View Source

    Debug()

    Creates an instance of Credentials to be used during development. Not enabled for Realm Object Server configured for production.

    Declaration
    public static Credentials Debug()
    Returns
    Type Description
    Credentials

    An instance of Credentials that can be used in LoginAsync(Credentials, Uri)

    | Improve this Doc View Source

    Facebook(String)

    Creates Credentials based on a Facebook login.

    Declaration
    public static Credentials Facebook(string facebookToken)
    Parameters
    Type Name Description
    String facebookToken

    A Facebook authentication token, obtained by logging into Facebook.

    Returns
    Type Description
    Credentials

    An instance of Credentials that can be used in LoginAsync(Credentials, Uri)

    | Improve this Doc View Source

    Google(String)

    Creates Credentials based on a Google login.

    Declaration
    public static Credentials Google(string googleToken)
    Parameters
    Type Name Description
    String googleToken

    A Google authentication token, obtained by logging into Google.

    Returns
    Type Description
    Credentials

    An instance of Credentials that can be used in LoginAsync(Credentials, Uri)

    | Improve this Doc View Source

    UsernamePassword(String, String, Boolean)

    Creates Credentials based on a login with a username and a password.

    Declaration
    public static Credentials UsernamePassword(string username, string password, bool createUser)
    Parameters
    Type Name Description
    String username

    The username of the user.

    String password

    The user's password.

    Boolean createUser

    true if the user should be created, false otherwise. It is not possible to create a user twice when logging in, so this flag should only be set to true the first time a user logs in.

    Returns
    Type Description
    Credentials

    An instance of Credentials that can be used in LoginAsync(Credentials, Uri)

    • Improve this Doc
    • View Source
    Back to top Copyright © 2017 Realm
    Generated by DocFX