@@ -32,11 +32,20 @@ namespace Microsoft.Identity.Web.Client.TokenCacheProviders
32
32
{
33
33
public static class MSALAppSqlTokenCacheProviderExtension
34
34
{
35
- /// <summary>
36
- /// Adds the Sql Server based application token cache to the service collection.
37
- /// </summary>
38
- /// <param name="services">The services collection to add to.</param>
35
+ /// <summary>Adds the app and per user SQL token caches.</summary>
39
36
/// <param name="configuration">The configuration instance from where this method pulls the connection string to the Sql database.</param>
37
+ /// <param name="sqlTokenCacheOptions">The MSALSqlTokenCacheOptions is used by the caller to specify the Sql connection string</param>
38
+ /// <returns></returns>
39
+ public static IServiceCollection AddSqlTokenCaches ( this IServiceCollection services , MSALSqlTokenCacheOptions sqlTokenCacheOptions )
40
+ {
41
+ AddSqlAppTokenCache ( services , sqlTokenCacheOptions ) ;
42
+ AddSqlPerUserTokenCache ( services , sqlTokenCacheOptions ) ;
43
+ return services ;
44
+ }
45
+
46
+ /// <summary>Adds the Sql Server based application token cache to the service collection.</summary>
47
+ /// <param name="services">The services collection to add to.</param>
48
+ /// <param name="sqlTokenCacheOptions">The MSALSqlTokenCacheOptions is used by the caller to specify the Sql connection string</param>
40
49
/// <returns></returns>
41
50
public static IServiceCollection AddSqlAppTokenCache ( this IServiceCollection services , MSALSqlTokenCacheOptions sqlTokenCacheOptions )
42
51
{
@@ -66,8 +75,8 @@ public static IServiceCollection AddSqlAppTokenCache(this IServiceCollection ser
66
75
}
67
76
68
77
/// <summary>Adds the Sql Server based per user token cache to the service collection.</summary>
69
- /// <param name="services">The services.</param>
70
- /// <param name="configuration ">The configuration instance from where this method pulls the connection string to the Sql database. </param>
78
+ /// <param name="services">The services collection to add to .</param>
79
+ /// <param name="sqlTokenCacheOptions ">The MSALSqlTokenCacheOptions is used by the caller to specify the Sql connection string </param>
71
80
/// <returns></returns>
72
81
public static IServiceCollection AddSqlPerUserTokenCache ( this IServiceCollection services , MSALSqlTokenCacheOptions sqlTokenCacheOptions )
73
82
{
0 commit comments