C# Класс Realms.Sync.Credentials

A class, representing the credentials used for authenticating a User.
Показать файл Открыть проект Примеры использования класса

Открытые методы

Метод Описание
Custom ( string identityProvider, string userIdentifier, object>.IDictionary userInfo ) : Credentials

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

Debug ( ) : Credentials

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

Facebook ( string facebookToken ) : Credentials

Creates Credentials based on a Facebook login.

Google ( string googleToken ) : Credentials

Creates Credentials based on a Google login.

UsernamePassword ( string username, string password, bool createUser ) : Credentials

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

Приватные методы

Метод Описание
AccessToken ( string accessToken, string identity, bool isAdmin = false ) : Credentials
Credentials ( ) : System
Credentials ( ) : System.Collections.Generic
ToJson ( ) : JsonObject

Описание методов

Custom() публичный статический Метод

Creates an instance of Credentials with a custom provider and user identifier.
public static Custom ( string identityProvider, string userIdentifier, object>.IDictionary userInfo ) : Credentials
identityProvider string Provider used to verify the credentials.
userIdentifier string String identifying the user. Usually a username of id.
userInfo object>.IDictionary 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.
Результат Credentials

Debug() публичный статический Метод

Creates an instance of Credentials to be used during development. Not enabled for Realm Object Server configured for production.
public static Debug ( ) : Credentials
Результат Credentials

Facebook() публичный статический Метод

Creates Credentials based on a Facebook login.
public static Facebook ( string facebookToken ) : Credentials
facebookToken string A Facebook authentication token, obtained by logging into Facebook.
Результат Credentials

Google() публичный статический Метод

Creates Credentials based on a Google login.
public static Google ( string googleToken ) : Credentials
googleToken string A Google authentication token, obtained by logging into Google.
Результат Credentials

UsernamePassword() публичный статический Метод

Creates Credentials based on a login with a username and a password.
public static UsernamePassword ( string username, string password, bool createUser ) : Credentials
username string The username of the user.
password string The user's password.
createUser bool 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.
Результат Credentials