Class Credentials
A class, representing the credentials used for authenticating a User.
Inherited Members
Namespace:Realms.Sync
Assembly:Realm.Sync.dll
Syntax
public class Credentials
Properties
| Improve this Doc View SourceIdentityProvider
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. |
Token
Gets the access token.
Declaration
public string Token { get; }
Property Value
Type | Description |
---|---|
String | The access token. |
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 SourceAzureAD(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) |
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) |
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) |
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) |
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) |
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 |
|
Returns
Type | Description |
---|---|
Credentials | An instance of Credentials that can be used in LoginAsync(Credentials, Uri) |