-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
131 changed files
with
1,800 additions
and
5,705 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
File renamed without changes.
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,27 @@ | ||
namespace DoWork; | ||
|
||
using Microsoft.EntityFrameworkCore; | ||
|
||
using Pidp.Data; | ||
using Pidp.Infrastructure.HttpClients.Keycloak; | ||
|
||
public class DoWorkService : IDoWorkService | ||
{ | ||
private readonly IKeycloakAdministrationClient keycloakClient; | ||
private readonly PidpDbContext context; | ||
|
||
public DoWorkService(IKeycloakAdministrationClient keycloakClient, PidpDbContext context) | ||
{ | ||
this.keycloakClient = keycloakClient; | ||
this.context = context; | ||
} | ||
|
||
public async Task DoWorkAsync() | ||
{ | ||
var userId = await this.context.Parties | ||
.Where(party => party.Id == 1001) | ||
.Select(party => party.Credentials.First().UserId) | ||
.SingleOrDefaultAsync(); | ||
await this.keycloakClient.GetUser(userId); | ||
} | ||
} |
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 |
---|---|---|
@@ -0,0 +1,9 @@ | ||
namespace DoWork; | ||
|
||
public interface IDoWorkService | ||
{ | ||
/// <summary> | ||
/// A service with DI that can be updated to perform manual tasks. | ||
/// </summary> | ||
public Task DoWorkAsync(); | ||
} |
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 |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# Do-Work Tool | ||
|
||
This tool is intended as a standalone app to run ad-hoc scripts and migrations using the same Dependancy Injection as the main webapi project. | ||
Add whatever additional services you may need to the DI in `Program.cs`, and update `appsettings.json` with the needed environment variables/screts. | ||
Be sure not to commit any secrets when doing so. |
File renamed without changes.
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 was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
backend/webapi/Data/Configuration/HealthAuthorityConfiguration.cs
This file was deleted.
Oops, something went wrong.
7 changes: 0 additions & 7 deletions
7
backend/webapi/Data/Configuration/OrganizationConfiguration.cs
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.