-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ECER-485: Authentication SSO (BCeID) (#8)
Co-authored-by: ytqsl <[email protected]>
- Loading branch information
Showing
38 changed files
with
22,285 additions
and
2,322 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -395,4 +395,7 @@ FodyWeavers.xsd | |
*.msp | ||
|
||
# JetBrains Rider | ||
*.sln.iml | ||
*.sln.iml | ||
|
||
# Ignore all JetBrains files | ||
.idea/ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
33 changes: 33 additions & 0 deletions
33
src/ECER.Clients.RegistryPortal/ECER.Clients.RegistryPortal.Server/ConfigurationEndpoints.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
using ECER.Utilities.Hosting; | ||
|
||
namespace ECER.Clients.RegistryPortal.Server; | ||
|
||
public class ConfigurationEndpoints : IRegisterEndpoints | ||
{ | ||
public void Register(IEndpointRouteBuilder endpointRouteBuilder) | ||
{ | ||
endpointRouteBuilder.MapGet("/api/configuration", async (HttpContext ctx) => | ||
{ | ||
await Task.CompletedTask; | ||
var configuration = ctx.RequestServices.GetRequiredService<IConfiguration>(); | ||
var appConfig = configuration.Get<ApplicationConfiguration>(); | ||
return TypedResults.Ok(appConfig); | ||
}).WithOpenApi("Frontend Configuration", "Frontend Configuration endpoint", "configuration"); | ||
} | ||
} | ||
|
||
#pragma warning disable CA2227 // Collection properties should be read only | ||
|
||
public class ApplicationConfiguration | ||
{ | ||
public Dictionary<string, OidcAuthenticationSettings> AuthenticationMethods { get; set; } = []; | ||
} | ||
|
||
#pragma warning restore CA2227 // Collection properties should be read only | ||
|
||
public record OidcAuthenticationSettings | ||
{ | ||
public string Authority { get; set; } = null!; | ||
public string ClientId { get; set; } = null!; | ||
public string Scope { get; set; } = null!; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
2 changes: 1 addition & 1 deletion
2
...ER.Clients.RegistryPortal/ECER.Clients.RegistryPortal.Server/appsettings.Development.json
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -26,3 +26,5 @@ coverage | |
*.njsproj | ||
*.sln | ||
*.sw? | ||
|
||
*.env |
1 change: 1 addition & 0 deletions
1
src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/.prettierignore
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
types |
1 change: 1 addition & 0 deletions
1
src/ECER.Clients.RegistryPortal/ecer.clients.registryportal.client/.prettierrc
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
{ "printWidth": 120 } |
Oops, something went wrong.