docs.unity3d.com
Search Results for

    Show / Hide Table of Contents

    Interface IVivoxTokenProvider

    Must be implemented by the SetTokenProvider(IVivoxTokenProvider) caller. This object's responsibility is to provide an overridable implementation that will generate tokens for Vivox actions.

    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.

    TimeSpan? 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.

    Returns
    Type Description
    Task<string>

    A Vivox token string.

    In This Article
    Back to top
    Copyright © 2024 Unity Technologies — Trademarks and terms of use
    • Legal
    • Privacy Policy
    • Cookie Policy
    • Do Not Sell or Share My Personal Information
    • Your Privacy Choices (Cookie Settings)