Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/bugthesystem/owin.security.redistokenproviders

A RefreshTokenProvider using Redis as token store for Microsoft.Owin
https://github.com/bugthesystem/owin.security.redistokenproviders

c-sharp oauth2 redis refresh-tokens

Last synced: 4 months ago
JSON representation

A RefreshTokenProvider using Redis as token store for Microsoft.Owin

Awesome Lists containing this project

README

        

OAuth.RedisRefreshTokenProvider
================================================================

A RefreshTokenProvider using Redis as token store.

**To install Owin.Security.RedisTokenProviders**

```csharp
Install-Package Owin.Security.RedisTokenProviders
```

**Set RefreshTokenProvider property of OAuthAuthorizationServerOptions**

```csharp
OAuthOptions = new OAuthAuthorizationServerOptions
{
//Other configurations

RefreshTokenProvider = new RedisRefreshTokenProvider(new ProviderConfiguration
{
Db = 0,
ExpiresUtc = DateTime.UtcNow.AddYears(1),
Port = 6379,
Host = "localhost",
AbortOnConnectFail =true //Optional (default:true)
})
{
RedisKeyGenerator = (authenticationTicket, token) => token, // Optional
RefreshTokenGenerator = () => Guid.NewGuid().ToString() // Optional
}
};

```

Open Source Projects in use
---------------------
* [StackExchange.Redis](https://github.com/StackExchange/StackExchange.Redis) by StackExchange