Skip to content
This repository has been archived by the owner on Jul 31, 2024. It is now read-only.

Commit

Permalink
Add AddPersistedGrantStore<T> extension method (#2783)
Browse files Browse the repository at this point in the history
  • Loading branch information
thomaslevesque authored and leastprivilege committed Nov 7, 2018
1 parent b6c16ec commit 3d99cee
Showing 1 changed file with 14 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,20 @@ public static IIdentityServerBuilder AddResourceStore<T>(this IIdentityServerBui
return builder;
}

/// <summary>
/// Adds a persisted grant store.
/// </summary>
/// <typeparam name="T">The type of the concrete grant store that is registered in DI.</typeparam>
/// <param name="builder">The builder.</param>
/// <returns>The builder.</returns>
public static IIdentityServerBuilder AddPersistedGrantStore<T>(this IIdentityServerBuilder builder)
where T : class, IPersistedGrantStore
{
builder.Services.AddTransient<IPersistedGrantStore, T>();

return builder;
}

/// <summary>
/// Adds a CORS policy service.
/// </summary>
Expand Down

0 comments on commit 3d99cee

Please sign in to comment.