public string Start(string secret, string userId, KalturaSessionType type, int partnerId, int expiry, string privileges) { KalturaParams kparams = new KalturaParams(); kparams.AddStringIfNotNull("secret", secret); kparams.AddStringIfNotNull("userId", userId); kparams.AddEnumIfNotNull("type", type); kparams.AddIntIfNotNull("partnerId", partnerId); kparams.AddIntIfNotNull("expiry", expiry); kparams.AddStringIfNotNull("privileges", privileges); _Client.QueueServiceCall("session", "start", kparams); if (this._Client.IsMultiRequest) { return(null); } XmlElement result = _Client.DoQueue(); return(result.InnerText); }
public string GenerateSession(string adminSecretForSigning, string userId, KalturaSessionType type, int partnerId, int expiry, string privileges) { string ks = string.Format("{0};{0};{1};{2};{3};{4};{5};", partnerId, UnixTimeNow() + expiry, type.GetHashCode(), DateTime.Now.Ticks, userId, privileges); SHA1 sha = new SHA1CryptoServiceProvider(); byte[] ksTextBytes = Encoding.ASCII.GetBytes(adminSecretForSigning + ks); byte[] sha1Bytes = sha.ComputeHash(ksTextBytes); string sha1Hex = ""; foreach (char c in sha1Bytes) { sha1Hex += string.Format("{0:x2}", (int)c); } ks = sha1Hex.ToLower() + "|" + ks; return(EncodeTo64(ks)); }
public string GenerateSession(string adminSecretForSigning, string userId, KalturaSessionType type, int partnerId, int expiry) { return(this.GenerateSession(adminSecretForSigning, userId, type, partnerId, expiry, "")); }
public string GenerateSession(string adminSecretForSigning, string userId, KalturaSessionType type) { return(this.GenerateSession(adminSecretForSigning, userId, type, -1)); }
public string GenerateSession(string adminSecretForSigning, string userId, KalturaSessionType type, int partnerId, int expiry, string privileges) { string ks = string.Format("{0};{0};{1};{2};{3};{4};{5};", partnerId, UnixTimeNow() + expiry, type.GetHashCode(), DateTime.Now.Ticks, userId, privileges); SHA1 sha = new SHA1CryptoServiceProvider(); byte[] ksTextBytes = Encoding.ASCII.GetBytes(adminSecretForSigning + ks); byte[] sha1Bytes = sha.ComputeHash(ksTextBytes); string sha1Hex = ""; foreach (char c in sha1Bytes) sha1Hex += string.Format("{0:x2}", (int)c); ks = sha1Hex.ToLower() + "|" + ks; return EncodeTo64(ks); }
public string GenerateSession(string adminSecretForSigning, string userId, KalturaSessionType type, int partnerId, int expiry) { return this.GenerateSession(adminSecretForSigning, userId, type, partnerId, expiry, ""); }
public string GenerateSession(string adminSecretForSigning, string userId, KalturaSessionType type) { return this.GenerateSession(adminSecretForSigning, userId, type, -1); }
public string Impersonate(string secret, int impersonatedPartnerId, string userId, KalturaSessionType type, int partnerId, int expiry) { return(this.Impersonate(secret, impersonatedPartnerId, userId, type, partnerId, expiry, null)); }
public string Impersonate(string secret, int impersonatedPartnerId, string userId, KalturaSessionType type, int partnerId) { return(this.Impersonate(secret, impersonatedPartnerId, userId, type, partnerId, 86400)); }
public string Impersonate(string secret, int impersonatedPartnerId, string userId, KalturaSessionType type) { return(this.Impersonate(secret, impersonatedPartnerId, userId, type, Int32.MinValue)); }
public string Start(string secret, string userId, KalturaSessionType type, int partnerId, int expiry) { return(this.Start(secret, userId, type, partnerId, expiry, null)); }
public string Start(string secret, string userId, KalturaSessionType type, int partnerId) { return(this.Start(secret, userId, type, partnerId, 86400)); }
public string Start(string secret, string userId, KalturaSessionType type) { return(this.Start(secret, userId, type, Int32.MinValue)); }