Skip to content

Commit 8a8f433

Browse files
authored
Merge pull request #44 from geeklearningio/release/1.1.0
Release/1.1.0
2 parents 1995355 + daf3534 commit 8a8f433

File tree

3 files changed

+10
-20
lines changed

3 files changed

+10
-20
lines changed

src/GeekLearning.Testavior/Authentication/TestAuthenticationExtensions.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@ public static class TestAuthenticationExtensions
1010
{
1111
public static AuthenticationBuilder AddTestAuthentication(this AuthenticationBuilder builder, string authenticationScheme, string displayName, Action<TestAuthenticationOptions> configureOptions)
1212
{
13-
builder.Services.TryAddEnumerable(ServiceDescriptor.Singleton<IPostConfigureOptions<TestAuthenticationOptions>, TestAuthenticationPostConfigureOptions>());
1413
return builder.AddScheme<TestAuthenticationOptions, TestAuthenticationHandler>(authenticationScheme, displayName, configureOptions);
1514
}
1615
}

src/GeekLearning.Testavior/Authentication/TestAuthenticationPostConfigureOptions.cs

Lines changed: 0 additions & 12 deletions
This file was deleted.

src/GeekLearning.Testavior/Environment/TestStartupConfigurationService.cs

Lines changed: 10 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -52,12 +52,12 @@ protected virtual void SetupStore(IApplicationBuilder app)
5252

5353
dbContext.Database.OpenConnection();
5454
dbContext.Database.EnsureCreated();
55-
}
55+
}
5656
}
5757

5858
protected virtual void SetupBuilder(IApplicationBuilder app)
5959
{
60-
app.UseAuthentication();
60+
app.UseAuthentication();
6161
}
6262

6363
protected virtual void ConfigureStore(IServiceCollection services)
@@ -71,11 +71,14 @@ protected virtual void ConfigureStore(IServiceCollection services)
7171

7272
protected virtual void ConfigureAuthentication(IServiceCollection services, string authenticationDefaultScheme = "Test")
7373
{
74-
services.AddAuthentication(authenticationDefaultScheme)
75-
.AddTestAuthentication(authenticationDefaultScheme, "Test Authentication Scheme", o =>
76-
{
77-
o.Identity = ConfigureIdentity();
78-
});
74+
services.AddAuthentication(o =>
75+
{
76+
o.DefaultAuthenticateScheme = authenticationDefaultScheme;
77+
})
78+
.AddTestAuthentication(authenticationDefaultScheme, "Test Authentication Scheme", o =>
79+
{
80+
o.Identity = ConfigureIdentity();
81+
});
7982
}
8083

8184
protected virtual ClaimsIdentity ConfigureIdentity()

0 commit comments

Comments
 (0)