From e53459e533482780c02d78e62c3c4845be18874e Mon Sep 17 00:00:00 2001 From: sacOO7 Date: Thu, 18 Apr 2024 17:12:45 +0530 Subject: [PATCH] updated README for jwt auth --- README.md | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 5dc334c0f..45bb9f8e9 100644 --- a/README.md +++ b/README.md @@ -426,11 +426,13 @@ var options = new ClientOptions { // Return serialized jwttokenstring returned from server string jwtToken = await getJwtTokenFromServer(tokenParams); - return await new TokenDetails(jwtToken); // jwt token will directly be used to authenticate with server. + int expiresIn = 3600; // assuming jwtToken has 1 hr expiry + return new TokenDetails(jwtToken) { + Expires = DateTimeOffset.UtcNow.AddSeconds(expiresIn) + }; // jwt token will directly be used to authenticate with server. } }; ``` -- Please note that there is no intermediate step to obtain token from server, jwt will directly be used to authenticate with ably. - Do check [official token auth documentation](https://ably.com/docs/auth/token?lang=csharp) for more information. ### Fetching your application's stats