Skip to content

Commit 5681262

Browse files
Switch to OpenIddict auth, update tests and config
Migrated FileProcessor API authentication from JwtBearer to OpenIddict validation, updating MiddlewareRegistry and adding required OpenIddict NuGet packages. Adjusted in-memory test config to include ApiName for audience validation. Updated feature and test files to remove estateManagement and voucherManagement scopes/resources, add required claims to transactionProcessor, and restrict serviceClient scopes. Removed obsolete BootstrapperTests.cs. Updated generated feature files to reflect these changes.
1 parent eac693a commit 5681262

11 files changed

Lines changed: 143 additions & 268 deletions

File tree

FileProcessor.BusinessLogic.Tests/MediatorTests.cs

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,6 @@ public async Task Mediator_Send_RequestHandled()
4949

5050
this.AddTestRegistrations(services, hostingEnvironment.Object);
5151
s.ConfigureContainer(services);
52-
Startup.Container.AssertConfigurationIsValid(AssertMode.Full);
5352

5453
List<String> errors = new List<String>();
5554
IMediator mediator = Startup.Container.GetService<IMediator>();

FileProcessor.IntegrationTests/Features/GetFileImportDetails.feature

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,17 @@ Feature: GetFileImportDetails
44
Background:
55
Given I create the following api scopes
66
| Name | DisplayName | Description |
7-
| estateManagement | Estate Managememt REST Scope | A scope for Estate Managememt REST |
87
| transactionProcessor | Transaction Processor REST Scope | A scope for Transaction Processor REST |
9-
| voucherManagement | Voucher Management REST Scope | A scope for Voucher Management REST |
108
| fileProcessor | File Processor REST Scope | A scope for File Processor REST |
119

1210
Given the following api resources exist
1311
| Name | DisplayName | Secret | Scopes | UserClaims |
14-
| estateManagement | Estate Managememt REST | Secret1 | estateManagement | MerchantId, EstateId, role |
15-
| transactionProcessor | Transaction Processor REST | Secret1 | transactionProcessor | |
16-
| voucherManagement | Voucher Management REST | Secret1 | voucherManagement | |
12+
| transactionProcessor | Transaction Processor REST | Secret1 | transactionProcessor | MerchantId, EstateId, role |
1713
| fileProcessor | File Processor REST | Secret1 | fileProcessor | |
1814

1915
Given the following clients exist
2016
| ClientId | ClientName | Secret | Scopes | GrantTypes |
21-
| serviceClient | Service Client | Secret1 | estateManagement,transactionProcessor,voucherManagement,fileProcessor | client_credentials |
17+
| serviceClient | Service Client | Secret1 | transactionProcessor,fileProcessor | client_credentials |
2218

2319
Given I have a token to access the estate management and transaction processor resources
2420
| ClientId |

FileProcessor.IntegrationTests/Features/GetFileImportDetails.feature.cs

Lines changed: 31 additions & 51 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

FileProcessor.IntegrationTests/Features/ProcessTopupCSV.feature

Lines changed: 2 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,21 +4,17 @@ Feature: Process Topup CSV Files
44
Background:
55
Given I create the following api scopes
66
| Name | DisplayName | Description |
7-
| estateManagement | Estate Managememt REST Scope | A scope for Estate Managememt REST |
87
| transactionProcessor | Transaction Processor REST Scope | A scope for Transaction Processor REST |
9-
| voucherManagement | Voucher Management REST Scope | A scope for Voucher Management REST |
108
| fileProcessor | File Processor REST Scope | A scope for File Processor REST |
119

1210
Given the following api resources exist
1311
| Name | DisplayName | Secret | Scopes | UserClaims |
14-
| estateManagement | Estate Managememt REST | Secret1 | estateManagement | MerchantId, EstateId, role |
15-
| transactionProcessor | Transaction Processor REST | Secret1 | transactionProcessor | |
16-
| voucherManagement | Voucher Management REST | Secret1 | voucherManagement | |
12+
| transactionProcessor | Transaction Processor REST | Secret1 | transactionProcessor | MerchantId, EstateId, role |
1713
| fileProcessor | File Processor REST | Secret1 | fileProcessor | |
1814

1915
Given the following clients exist
2016
| ClientId | ClientName | Secret | Scopes | GrantTypes |
21-
| serviceClient | Service Client | Secret1 | estateManagement,transactionProcessor,voucherManagement,fileProcessor | client_credentials |
17+
| serviceClient | Service Client | Secret1 | transactionProcessor,fileProcessor | client_credentials |
2218

2319
Given I have a token to access the estate management and transaction processor resources
2420
| ClientId |

0 commit comments

Comments
 (0)