Interface IVivoxTokenProvider
Must be implemented by the Set
Namespace: Unity.Services.Vivox
Assembly: Unity.Services.Vivox.dll
Syntax
public interface IVivoxTokenProvider
Methods
GetTokenAsync(string, TimeSpan?, string, string, string, string, string)
This async method should implement the necessary steps to providing a valid Vivox Access Token (VAT). After registration, this method will automatically be called whenever a token needs to be generated for a particular action. (e.g. login, channel join, mute).
Declaration
Task<string> GetTokenAsync(string issuer = null, TimeSpan? expiration = null, string targetUserUri = null, string action = null, string channelUri = null, string fromUserUri = null, string realm = null)
Parameters
Type | Name | Description |
---|---|---|
string | issuer | Id of a title. Provided as part of the credentials delivered upon creating a project in the Unity Dashboard and enabling Vivox. |
Time |
expiration | When the token should expire. By default, a 90 second expiration is used. When entering this into the expiration field of the token payload, use '(int)expiration.Value.TotalSeconds' to get the integer value in seconds. You may provide a custom expiration to your token payload but it must be relative to Unix epoch and the current time plus the desired expiration duration. |
string | targetUserUri | Id of the target for actions such as muting and blocking. |
string | action | The action for which a token is requested. e.g.: "login", "join", ... |
string | channelUri | Id of the channel requesting the token. |
string | fromUserUri | Id of the user requesting the token. |
string | realm | Domain for which the token should be created. |