Override development key generation
Learn about override development key generation.
Read time 1 minuteLast updated 7 months ago
Prerequisite: This topic assumes you have already created a token generation service.
Don't include development and testing codes, such as those generated in , in any final shipped build. Instead, write a new class that inherits from and overrides the existing functions. This sends the relevant information for each key out to the new secure token generation server.
VxTokenGen.csVxTokenGen.csConfigure this new class to override the method within . The following code displays an example of this class:
GetToken()VxTokenGen.cspublic class MyTokenGenOverride : VxTokenGen{ public override string GetToken(string issuer = null, TimeSpan? expiration = null, string userUri = null, string action = null, string tokenKey = null, string conferenceUri = null, string fromUserUri = null) { //Server Token Generation calls go here }}public void SetTokenOverride(){ Client.tokenGen = new MyTokenGenOverride();}
Afterward, use this class to replace the value of the variable. All further calls through and will route their UserUri and other assorted parameters through to the server generation code.
Client.tokenGen GetLoginToken, GetJoinToken, GetMuteForAllToken,GetTranscriptionToken