RestSharp Authenticator
CredentialStore.RegisterRefresh("ClientAPI", (o) => {
return new RestSharpCredentialStoreItem(
new RestSharp.Authenticators.JwtAuthenticator("MyToken"),
DateTimeOffset.UtcNow.AddMinutes(58));
});var rco = new RestClientOptions("https://localhost.com")
{
//Assign the CredentialAuthenticator with the name tied to the refresh
Authenticator = new CredentialAuthenticator("ClientAPI")
};
//Create a new client
using var client = new RestClient(rco);
//Anytime you execute any requests, it's automatically maintained. Last updated

