コード例 #1
0
 public static IIdentityServiceBuilder AddApplications <TUser, TApplication>(this IdentityBuilder builder)
     where TUser : class
     where TApplication : class
 {
     builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton <IConfigureOptions <IdentityServiceOptions>, DefaultSetup>());
     return(builder.AddApplications <TUser, TApplication>(options =>
     {
         options.IdTokenOptions.ContextClaims.AddSingle("tfp", "policy");
         options.IdTokenOptions.ContextClaims.AddSingle("ver", "version");
         options.AccessTokenOptions.ContextClaims.AddSingle("tfp", "policy");
         options.AccessTokenOptions.ContextClaims.AddSingle("ver", "version");
     }));
 }
コード例 #2
0
 public static IIdentityServiceBuilder AddApplications <TUser, TApplication>(this IdentityBuilder builder)
     where TUser : class
     where TApplication : class
 {
     builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton <IConfigureOptions <IdentityServiceOptions>, DefaultSetup>());
     return(builder.AddApplications <TUser, TApplication>(options =>
     {
         options.Issuer = "https://localhost/DFC7191F-FF74-42B9-A292-08FEA80F5B20/v2.0/";
         options.IdTokenOptions.ContextClaims.AddSingle("tfp", "policy");
         options.IdTokenOptions.ContextClaims.AddSingle("ver", "version");
         options.AccessTokenOptions.ContextClaims.AddSingle("tfp", "policy");
         options.AccessTokenOptions.ContextClaims.AddSingle("ver", "version");
     }));
 }