Skip to content

Commit

Permalink
updated README for jwt auth
Browse files Browse the repository at this point in the history
  • Loading branch information
sacOO7 committed Apr 18, 2024
1 parent 1bf0218 commit e53459e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit e53459e

Please sign in to comment.