question

HS-6650 avatar image
0 Votes"
HS-6650 asked Vishu-8077 commented

How to create API for jwt token issuer for azure video analyzer player widget

I am using azure video analyzer player widget in my react js application and I want to use API for jwt token issuer so that in the client side I can get fresh token after expiration. How can I create API for the same to consume it in the client side?

azure-media-services
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

How are you handling the creation of the JWT from the token issuer?

0 Votes 0 ·

1 Answer

RussellCooks-0771 avatar image
0 Votes"
RussellCooks-0771 answered Vishu-8077 commented

Hello, please refer to this documentation here. https://github.com/Azure/video-analyzer/tree/main/widgets#token-refresh
It shows how to add an event listener to update the token when the token is expired.

· 3
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hi @RussellCooks-0771 , I have same question i.e. in case we need to refresh the access token periodically then we can do this by using the below script
132204-image.png



So, in the fetch parameter do we need to provide API url of the jwt token issuer?

0 Votes 0 ·
image.png (19.5 KiB)

Yes, that is correct.

0 Votes 0 ·

@RussellCooks-0771 do u have any suggestion on how to generate jwt token through API or any microsoft docs available for the same?

0 Votes 0 ·