Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix/admin logout redirect #374

Merged
merged 5 commits into from
Oct 20, 2019
Merged
Show file tree
Hide file tree
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 @@ -8,6 +8,8 @@ public class AdminApiConfiguration

public string IdentityServerBaseUrl { get; set; }

public string ApiBaseUrl { get; set; }

public string OidcSwaggerUIClientId { get; set; }

public string OidcApiName { get; set; }
Expand Down
2 changes: 1 addition & 1 deletion src/Skoruba.IdentityServer4.Admin.Api/Startup.cs
Original file line number Diff line number Diff line change
Expand Up @@ -102,7 +102,7 @@ public void Configure(IApplicationBuilder app, IHostingEnvironment env, AdminApi
app.UseSwagger();
app.UseSwaggerUI(c =>
{
c.SwaggerEndpoint("/swagger/v1/swagger.json", adminApiConfiguration.ApiName);
c.SwaggerEndpoint($"{adminApiConfiguration.ApiBaseUrl}/swagger/v1/swagger.json", adminApiConfiguration.ApiName);

c.OAuthClientId(adminApiConfiguration.OidcSwaggerUIClientId);
c.OAuthAppName(adminApiConfiguration.ApiName);
Expand Down
17 changes: 9 additions & 8 deletions src/Skoruba.IdentityServer4.Admin.Api/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,13 @@
"IdentityDbConnection": "Server=(localdb)\\mssqllocaldb;Database=IdentityServer4Admin;Trusted_Connection=True;MultipleActiveResultSets=true",
"AdminLogDbConnection": "Server=(localdb)\\mssqllocaldb;Database=IdentityServer4Admin;Trusted_Connection=True;MultipleActiveResultSets=true"
},
"AdminApiConfiguration": {
"ApiName": "Skoruba IdentityServer4 Admin Api",
"ApiVersion": "v1",
"IdentityServerBaseUrl": "http://localhost:5000",
"OidcSwaggerUIClientId": "skoruba_identity_admin_api_swaggerui",
"OidcApiName": "skoruba_identity_admin_api",
"AdministrationRole": "SkorubaIdentityAdminAdministrator"
}
"AdminApiConfiguration": {
"ApiName": "Skoruba IdentityServer4 Admin Api",
"ApiVersion": "v1",
"ApiBaseUrl": "http://localhost:5001",
"IdentityServerBaseUrl": "http://localhost:5000",
"OidcSwaggerUIClientId": "skoruba_identity_admin_api_swaggerui",
"OidcApiName": "skoruba_identity_admin_api",
"AdministrationRole": "SkorubaIdentityAdminAdministrator"
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@ public IActionResult AccessDenied()

public IActionResult Logout()
{
return new SignOutResult(new List<string> { AuthenticationConsts.SignInScheme, AuthenticationConsts.OidcAuthenticationScheme },
new AuthenticationProperties { RedirectUri = "/" });
return new SignOutResult(new List<string> { AuthenticationConsts.SignInScheme, AuthenticationConsts.OidcAuthenticationScheme });
}
}
}