Skip to content

seacen/OAuthST

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OAuthST

An OAuth controller that handles ROPC grant type authorization obtaining and auto token refreshing

NuGet Package

https://www.nuget.org/packages/OAuthST/

Usage

var account = new AuthController(new IOAuthClient());  // you need to create your own implementation of the IOAuthClient interface

// retrieved token is stored inside AuthController.Info
account.RetrieveAccessToken(username, password);

// auto refresh the token when it's about to expire
account.RenewTokenBeforeExpiry();

account.TokenRenewed += (object sender, TokenRenewedEventArgs e) =>
{
    // Do something when token is renewed
};

References

AuthController, IOAuthClient, AuthController.Info(OAuthResponse), AuthController.RetrieveAccessToken(username, password), AuthController.RenewTokenBeforeExpiry(), AuthController.TokenRenewed

About

An OAuth controller that handles ROPC grant type authorization obtaining and auto token refreshing

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors

Languages