- An IBM Cloud Video Streaming Manager for Enterprise with Authentication API account (You can request a Trial account here)
- Install .NET Core SDK
- Set up channel authentication for your channel(s) on Channels/Authentication dashboard
- Secret Key: Some random string, this secret key is used for signing and validating authorization data
- URL for the entry point of the authentication flow: http://127.0.0.1:5000/Home/Authorization This is the end point where you can authorize your users to the content and then generate the signed hash data.
- Set Secret Key in HomeController.cs
...
private const string hashSecret = "TOPSECRET";
...
- Set a video id in HomeController.cs which will be used in this example. (This video needs to be on the same channel that was set up in Step 2.)
...
private const int videoId = 1;
...
- Run demo on localhost
ASPNETCORE_ENVIRONMENT=Development dotnet run
- Open demo in your browser: http://127.0.0.1:5000/ (Recommended to use incognito mode)
- Check how authentication/authorization works in
HashlockDemo.Controllers.HomeController::Authorization
- Check how hash data generation works in
Ustream.Hash