/// <summary> /// Saves the authentication token channels permissions in the ORTC server. /// </summary> /// <param name="url">ORTC server URL.</param> /// <param name="isCluster">Indicates whether the ORTC server is in a cluster.</param> /// <param name="authenticationToken">Authentication Token which is generated by the application server, for instance a unique session ID.</param> /// <param name="authenticationTokenIsPrivate">Indicates whether the authentication token is private (1) or not (0).</param> /// <param name="applicationKey">Application Key that was provided to you together with the ORTC service purchasing.</param> /// <param name="timeToLive">The authentication token time to live, in other words, the allowed activity time (in seconds).</param> /// <param name="privateKey">The private key provided to you together with the ORTC service purchasing.</param> /// <param name="permissions">The channels and their permissions (w: write/read or r: read, case sensitive).</param> /// <returns>True if the authentication was successful or false if it was not.</returns> public static UnityTask <bool> PostAuthentication( string url, bool isCluster, string authenticationToken, bool authenticationTokenIsPrivate, string applicationKey, int timeToLive, string privateKey, Dictionary <string, List <ChannelPermissions> > permissions) { var client = new AuthenticationClient { Url = url, IsCluster = isCluster, AuthenticationToken = authenticationToken, AuthenticationTokenIsPrivate = authenticationTokenIsPrivate, ApplicationKey = applicationKey, TimeToLive = timeToLive, PrivateKey = privateKey, Permissions = permissions, }; return(client.PostAuthentication()); }
/// <summary> /// Saves the authentication token channels permissions in the ORTC server. /// </summary> /// <param name="url">ORTC server URL.</param> /// <param name="isCluster">Indicates whether the ORTC server is in a cluster.</param> /// <param name="authenticationToken">Authentication Token which is generated by the application server, for instance a unique session ID.</param> /// <param name="authenticationTokenIsPrivate">Indicates whether the authentication token is private (1) or not (0).</param> /// <param name="applicationKey">Application Key that was provided to you together with the ORTC service purchasing.</param> /// <param name="timeToLive">The authentication token time to live, in other words, the allowed activity time (in seconds).</param> /// <param name="privateKey">The private key provided to you together with the ORTC service purchasing.</param> /// <param name="permissions">The channels and their permissions (w: write/read or r: read, case sensitive).</param> /// <returns>True if the authentication was successful or false if it was not.</returns> public static UnityTask<bool> PostAuthentication( string url, bool isCluster, string authenticationToken, bool authenticationTokenIsPrivate, string applicationKey, int timeToLive, string privateKey, Dictionary<string, List<ChannelPermissions>> permissions) { var client = new AuthenticationClient { Url = url, IsCluster = isCluster, AuthenticationToken = authenticationToken, AuthenticationTokenIsPrivate = authenticationTokenIsPrivate, ApplicationKey = applicationKey, TimeToLive = timeToLive, PrivateKey = privateKey, Permissions = permissions, }; return client.PostAuthentication(); }