Class Credential
This is a credential object, storing authentication information
Inheritance
Implements
Namespace: Kinvey
Assembly: Kinvey.dll
Syntax
public class Credential : object, IKinveyRequestInitializer
Constructors
| Improve this Doc View SourceCredential()
Initializes a new instance of the Credential class.
Declaration
public Credential()
Credential(String, String, KinveyAuthSocialID, String, String, Dictionary<String, JToken>, KinveyUserMetaData, String, String, String, String)
Initializes a new instance of the Credential class.
Declaration
public Credential(string userId, string accessToken, KinveyAuthSocialID socialIdentity, string authToken, string userName, Dictionary<string, JToken> attributes, KinveyUserMetaData kmd, string refreshToken, string redirectURI, string deviceID, string micClientID)
Parameters
Type | Name | Description |
---|---|---|
System.String | userId | User ID |
System.String | accessToken | Access token |
KinveyAuthSocialID | socialIdentity | Kinvey user metadata |
System.String | authToken | Auth token |
System.String | userName | User name |
Dictionary<System.String, JToken> | attributes | User attributes |
KinveyUserMetaData | kmd | Kinvey metadata |
System.String | refreshToken | Refresh token |
System.String | redirectURI | Redirect URI |
System.String | deviceID | Device ID |
System.String | micClientID | MIC Client ID |
Properties
| Improve this Doc View SourceAccessToken
The access token.
Declaration
public string AccessToken { get; set; }
Property Value
Type | Description |
---|---|
System.String | The AccessToken property gets/sets the value of the string field, _accessToken. |
Attributes
Gets the attributes.
Declaration
public Dictionary<string, JToken> Attributes { get; }
Property Value
Type | Description |
---|---|
Dictionary<System.String, JToken> | The Attributes property gets the value of the Dictionary field, attributes. |
AuthSocialID
The _socialIdentity object.
Declaration
public KinveyAuthSocialID AuthSocialID { get; set; }
Property Value
Type | Description |
---|---|
KinveyAuthSocialID | The AuthSocialID property gets/sets the value of the KinveyAuthSocialID field, _authSocialID . |
AuthToken
Gets the auth token.
Declaration
public string AuthToken { get; }
Property Value
Type | Description |
---|---|
System.String | The auth token. |
DeviceID
The device ID associated with this user.
Declaration
public string DeviceID { get; set; }
Property Value
Type | Description |
---|---|
System.String | The DeviceID property gets/sets the value of the string field, _deviceID. |
MICClientID
Gets or sets the MIC Client identifier.
Declaration
public string MICClientID { get; set; }
Property Value
Type | Description |
---|---|
System.String | The MIC client identifier. |
RedirectUri
The redirect uri.
Declaration
public string RedirectUri { get; set; }
Property Value
Type | Description |
---|---|
System.String | The RedirectUri property gets/sets the value of the string field, _redirectUri. |
RefreshToken
The refresh token.
Declaration
public string RefreshToken { get; set; }
Property Value
Type | Description |
---|---|
System.String | The RefreshToken property gets/sets the value of the string field, _refreshToken. |
SecAuthToken
The access token.
Declaration
public byte[] SecAuthToken { get; set; }
Property Value
Type | Description |
---|---|
System.Byte[] | The SecAuthToken property gets/sets the value of the byte[] field, _secAuthToken. |
UserId
Gets the user _id.
Declaration
public string UserId { get; }
Property Value
Type | Description |
---|---|
System.String | The user identifier. |
UserKMD
The UserKMD property represents Kinvey user metadata.
Declaration
public KinveyUserMetaData UserKMD { get; }
Property Value
Type | Description |
---|---|
KinveyUserMetaData | The UserKMD property gets the value of the KinveyUserMetaData field, userKMD. |
UserName
The UserName property represents the user name.
Declaration
public string UserName { get; }
Property Value
Type | Description |
---|---|
System.String | The UserName property gets the value of the string field, userName. |
Methods
| Improve this Doc View SourceFrom(Credential, Byte[])
Creates new Credential from Credential object and encrypted auth token.
Declaration
public static Credential From(Credential cred, byte[] encryptedAuthToken)
Parameters
Type | Name | Description |
---|---|---|
Credential | cred | Credential object, storing authentication information. |
System.Byte[] | encryptedAuthToken | Encrypted auth token. |
Returns
Type | Description |
---|---|
Credential | Credential object, storing authentication information |
From(Credential, String)
Creates new Credential from Credential object and original auth token.
Declaration
public static Credential From(Credential cred, string originalAuthToken)
Parameters
Type | Name | Description |
---|---|---|
Credential | cred | Credential object, storing authentication information. |
System.String | originalAuthToken | Original auth token. |
Returns
Type | Description |
---|---|
Credential | Credential object, storing authentication information |
From(KinveyAuthResponse)
Create a new Credential from a KinveyAuthResponse.
Declaration
public static Credential From(KinveyAuthResponse response)
Parameters
Type | Name | Description |
---|---|---|
KinveyAuthResponse | response | The response of a Kinvey login/create request. |
Returns
Type | Description |
---|---|
Credential | Credential object, storing authentication information. |
From(NativeCredential)
Creates new Credential from NativeCredential object.
Declaration
public static Credential From(NativeCredential nc)
Parameters
Type | Name | Description |
---|---|---|
NativeCredential | nc | Native credential. |
Returns
Type | Description |
---|---|
Credential | Credential object, storing authentication information. |
From(User)
Create a new Credential from a Kinvey User object.
Declaration
public static Credential From(User user)
Parameters
Type | Name | Description |
---|---|---|
User | user | User. |
Returns
Type | Description |
---|---|
Credential | Credential object, storing authentication information. |
Initialize<T>(AbstractKinveyClientRequest<T>, String)
Initialize the specified clientRequest with this credential.
Declaration
public void Initialize<T>(AbstractKinveyClientRequest<T> clientRequest, string clientId = null)
Parameters
Type | Name | Description |
---|---|---|
AbstractKinveyClientRequest<T> | clientRequest | Client Request. |
System.String | clientId | [optional] Client Id. |
Type Parameters
Name | Description |
---|---|
T | The type of the Client Request |