Skip to content

Commit

Permalink
feat(notification): adjust mail and notification path
Browse files Browse the repository at this point in the history
Refs: #15
  • Loading branch information
Phil91 committed Apr 24, 2024
1 parent 5639bd5 commit 52f5ce9
Show file tree
Hide file tree
Showing 4 changed files with 22 additions and 11 deletions.
4 changes: 2 additions & 2 deletions src/externalservices/Portal.Service/Services/PortalService.cs
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ public async Task AddNotification(string content, Guid requester, NotificationTy
{
var client = await _tokenService.GetAuthorizedClient<PortalService>(_settings, cancellationToken).ConfigureAwait(false);
var data = new NotificationRequest(requester, content, notificationTypeId);
await client.PostAsJsonAsync("api/notifications/management", data, Options, cancellationToken)
await client.PostAsJsonAsync("api/notifications/ssi-credentials", data, Options, cancellationToken)
.CatchingIntoServiceExceptionFor("notification", HttpAsyncResponseMessageExtension.RecoverOptions.REQUEST_EXCEPTION)
.ConfigureAwait(false);
}
Expand All @@ -53,7 +53,7 @@ public async Task TriggerMail(string template, Guid requester, IEnumerable<MailP
{
var client = await _tokenService.GetAuthorizedClient<PortalService>(_settings, cancellationToken).ConfigureAwait(false);
var data = new MailData(requester, template, mailParameters);
await client.PostAsJsonAsync("api/administration/mail", data, Options, cancellationToken)
await client.PostAsJsonAsync("api/administration/mail/ssi-credentials", data, Options, cancellationToken)
.CatchingIntoServiceExceptionFor("mail", HttpAsyncResponseMessageExtension.RecoverOptions.REQUEST_EXCEPTION)
.ConfigureAwait(false);
}
Expand Down
9 changes: 1 addition & 8 deletions src/issuer/SsiCredentialIssuer.Service/appsettings.json
Original file line number Diff line number Diff line change
Expand Up @@ -71,13 +71,6 @@
"StatusListUrl": "",
"MaxPageSize": 15,
"EncryptionConfigIndex": 0,
"EncryptionConfigs": [
{
"Index": 0,
"EncryptionKey": "",
"CipherMode": "",
"PaddingMode": ""
}
]
"EncryptionConfigs": []
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ public async Task ExecuteAsync_WithPendingAndExpiryBeforeNow_DeclinesRequest()
A.CallTo(() => _issuerRepositories.SaveAsync()).MustHaveHappenedOnceExactly();
A.CallTo(() => _processStepRepository.CreateProcess(ProcessTypeId.DECLINE_CREDENTIAL)).MustHaveHappenedOnceExactly();
A.CallTo(() => _processStepRepository.CreateProcessStep(ProcessStepTypeId.REVOKE_CREDENTIAL, ProcessStepStatusId.TODO, A<Guid>._)).MustHaveHappenedOnceExactly();
ssiDetail.CompanySsiDetailStatusId.Should().Be(CompanySsiDetailStatusId.INACTIVE);
}

[Theory]
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,5 +44,24 @@
"PaddingMode": "PKCS7"
}
]
},
"Wallet": {
"Username": "empty",
"Password": "empty",
"ClientId": "sa-cl-test",
"GrantType": "client_credentials",
"ClientSecret": "test",
"Scope": "openid",
"TokenAddress": "https://example.org/auth/realms/xy/protocol/openid-connect/token",
"BaseAddress": "https://localhost:5001",
"EncryptionConfigIndex": 0,
"EncryptionConfigs": [
{
"Index": 0,
"EncryptionKey": "9b1503084ab5638260079cb61b8ed2d1fde462b5a7608556516a1659aeb3f541",
"CipherMode": "CBC",
"PaddingMode": "PKCS7"
}
]
}
}

0 comments on commit 52f5ce9

Please sign in to comment.