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

Add AddPersistedGrantStore<T> extension method for IIdentityServerBuilder #2783

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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