SigningKeys
Extends:
events~EventEmitter → src/base.js~Base → SigningKeys
Signing Key Class - Provides access to the Mux Video Signing Key API
Example:
const { Video } = new Mux(accessToken, secret);
// Create a new signing key
Video.SigningKeys.create();
Test:
Method Summary
Public Methods | ||
public |
Creates a new Signing Key that can be used with the JWT module to sign URLs. |
|
public |
Delete a signing key |
|
public |
Get a signing key. |
|
public |
List signing keys |
Public Methods
public create(): Promise source
Creates a new Signing Key that can be used with the JWT module to sign URLs.
Example:
const muxClient = new Mux(accessToken, secret);
const { Video } = muxClient;
// Create a new signing key
Video.SigningKeys.create();
public del(keyId: string): Promise source
Delete a signing key
Params:
Name | Type | Attribute | Description |
keyId | string | The ID for the signing key |
Example:
const { Video } = new Mux(accessToken, secret);
// Delete a signing key
Video.SigningKeys.del(keyId);
Test:
public get(keyId: string): Promise source
Get a signing key. Note The private key is not returned.
Params:
Name | Type | Attribute | Description |
keyId | string | The ID for the signing key |
Example:
const { Video } = new Mux(accessToken, secret);
// Get a signing key
Video.SigningKeys.get(keyId);