Compare commits
23 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
| 181056d70d | |||
| c01a02ee97 | |||
| dfb5ce8a4b | |||
| 36b2f365d9 | |||
| 9bff28cec2 | |||
| c76438b881 | |||
| 857173af25 | |||
| e29c1ef6fc | |||
| c8a4a4cb17 | |||
| 56e002875e | |||
| d485e78498 | |||
| ba3f8f6f9b | |||
| 815470ab07 | |||
| 16a2516816 | |||
| 8842d92b9b | |||
| fc25d7ea40 | |||
| 8d8c1436f6 | |||
| 0c14872602 | |||
| d0ec655085 | |||
| 3e23217eb4 | |||
| 17d2ac409b | |||
| 2d5614c504 | |||
| 5bb7c4a959 |
@@ -54,13 +54,13 @@
|
||||
</ItemGroup>
|
||||
|
||||
<ItemGroup>
|
||||
<PackageReference Include="LiteCharms.Features" Version="1.68.0" />
|
||||
<PackageReference Include="LiteCharms.Features" Version="1.92.0" />
|
||||
</ItemGroup>
|
||||
|
||||
<!-- UI -->
|
||||
<ItemGroup>
|
||||
<PackageReference Include="ANM.Blazored.Toast" Version="0.1.1" />
|
||||
<PackageReference Include="LiteCharms.Features.MidrandBooks" Version="1.68.0" />
|
||||
<PackageReference Include="LiteCharms.Features.MidrandBooks" Version="1.92.0" />
|
||||
|
||||
<!-- Global Usings -->
|
||||
<Using Include="Blazored.Toast.Services" />
|
||||
|
||||
@@ -4,7 +4,6 @@ using LiteCharms.Features.Extensions;
|
||||
using LiteCharms.Features.MidrandBooks.Payments;
|
||||
using LiteCharms.Features.MidrandBooks.Payments.Events;
|
||||
using LiteCharms.Features.MidrandBooks.Payments.Models;
|
||||
using LiteCharms.Features.Quartz.Abstractions;
|
||||
using static LiteCharms.Features.Extensions.Api;
|
||||
|
||||
namespace MidrandBooksApi.Payments.Endpoints;
|
||||
|
||||
@@ -0,0 +1,23 @@
|
||||
using LiteCharms.Features.Abstractions;
|
||||
using LiteCharms.Features.Api;
|
||||
using LiteCharms.Features.Extensions;
|
||||
|
||||
namespace MidrandBooksApi.Payments.Endpoints;
|
||||
|
||||
[ApiVersionTarget(1)]
|
||||
public class IdentityEndpoint : IEndpoint
|
||||
{
|
||||
public void Map(IEndpointRouteBuilder builder)
|
||||
{
|
||||
builder.MapGet("security/test", () =>
|
||||
{
|
||||
return Results.Ok();
|
||||
})
|
||||
.RequireAuthorization()
|
||||
.WithDescription("Security test endpoint")
|
||||
.WithName(typeof(IdentityEndpoint).ToEndpointName())
|
||||
.Produces(StatusCodes.Status200OK)
|
||||
.WithTags("Security")
|
||||
.MapToApiVersion(1);
|
||||
}
|
||||
}
|
||||
@@ -11,10 +11,8 @@ builder.Services.AddEndpointsApiExplorer();
|
||||
builder.Services.AddEndpoints(Assembly.GetExecutingAssembly());
|
||||
builder.Services.AddApiServices(builder.Configuration);
|
||||
|
||||
builder.Services.AddAuthorization();
|
||||
builder.Services.AddAuthentication();
|
||||
|
||||
builder.Services.AddMediator();
|
||||
builder.Services.AddLiteCharmsApiSecurity(builder.Configuration);
|
||||
|
||||
builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(TelemetryPipelineBehavior<,>));
|
||||
builder.Services.AddScoped(typeof(IPipelineBehavior<,>), typeof(LoggingPipelineBehavior<,>));
|
||||
|
||||
@@ -1,4 +1,8 @@
|
||||
{
|
||||
"LiteCharmsSettings": {
|
||||
"Authority": "https://sts.security.khongisa.co.za",
|
||||
"Audience": "midrandbooks-api"
|
||||
},
|
||||
"ValidPayfastHosts": [
|
||||
"www.payfast.co.za",
|
||||
"sandbox.payfast.co.za",
|
||||
|
||||
@@ -26,6 +26,8 @@ data:
|
||||
ValidPayfastHosts__4: "ips.payfast.co.za"
|
||||
ValidPayfastHosts__5: "api.payfast.co.za"
|
||||
ValidPayfastHosts__6: "payment.payfast.io"
|
||||
LiteCharmsSettings__Authority: "https://sts.security.khongisa.co.za"
|
||||
LiteCharmsSettings__Audience: "midrandbooks-api"
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: Secret
|
||||
@@ -41,6 +43,8 @@ data:
|
||||
hasher-payfastpassphrase: OUdBSVIwdFdwaFgwcU8=
|
||||
bookshop-s3-accesskey: R0s1MTRkMmNlOGRjNjkyMzdhMDVjMDFlZWY=
|
||||
bookshop-s3-secretkey: ZWFhZmVkYTFhZWQ0MDllY2ZlNjA3MTRlY2RhNTQ5YjgyYmRmNWEzZGFmOWYxOGRkNjFmNjZiNDk3M2E2NDgyZQ==
|
||||
litecharms-clientid: bWlkcmFuZGJvb2tzLWFwaQ==
|
||||
litecharms-clientsecret: c2VjcmV0X2YzZjA0YWNhYTMzNmVlOTEzZDRjNjdlYmQwOTE1ZWFlYzQ0NzdmYTkwOTdlYTJhYzkyZGE4ZDc0NjgzZTAyNTU=
|
||||
---
|
||||
apiVersion: v1
|
||||
kind: PersistentVolumeClaim
|
||||
@@ -93,6 +97,16 @@ spec:
|
||||
- configMapRef:
|
||||
name: midrandbooksapi-config
|
||||
env:
|
||||
- name: LiteCharmsSettings__ClientId
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: midrandbooksapi-secrets
|
||||
key: litecharms-clientid
|
||||
- name: LiteCharmsSettings__ClientSecret
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
name: midrandbooksapi-secrets
|
||||
key: litecharms-clientsecret
|
||||
- name: BookshopS3Settings__AccessKey
|
||||
valueFrom:
|
||||
secretKeyRef:
|
||||
|
||||
Reference in New Issue
Block a user