Skip to content

Commit 67be868

Browse files
chore(#19): this commit updates the internal package dependencies used in the project adjustments were made to the configuration for integration with the federation system.
1 parent ae7e59f commit 67be868

6 files changed

Lines changed: 11 additions & 14 deletions

File tree

Boundaries/Comanda.Subscriptions/Source/Comanda.Subscriptions.Application/Comanda.Subscriptions.Application.csproj

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88

99
<ItemGroup>
1010
<PackageReference Include="FluentValidation" Version="12.1.1" />
11-
<PackageReference Include="HttpsRichardy.Dispatcher" Version="1.0.2" />
12-
<PackageReference Include="HttpsRichardy.Federation.Sdk.Contracts" Version="1.0.2" />
11+
<PackageReference Include="HttpsRichardy.Dispatcher" Version="1.0.3" />
12+
<PackageReference Include="HttpsRichardy.Federation.Sdk.Contracts" Version="4.2.0" />
1313
</ItemGroup>
1414

1515
<ItemGroup>

Boundaries/Comanda.Subscriptions/Source/Comanda.Subscriptions.CrossCutting/Configurations/FederationSettings.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ public sealed record FederationSettings
55
public string ClientId { get; init; } = default!;
66
public string ClientSecret { get; init; } = default!;
77
public string Realm { get; init; } = default!;
8-
public string BaseUrl { get; init; } = default!;
8+
public string Authority { get; init; } = default!;
9+
public string[] Audiences { get; init; } = default!;
910
}

Boundaries/Comanda.Subscriptions/Source/Comanda.Subscriptions.WebApi/Comanda.Subscriptions.WebApi.csproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@
2020
<PackageReference Include="Sentry.Serilog" Version="6.0.0" />
2121
<PackageReference Include="Serilog.AspNetCore" Version="10.0.0" />
2222
<PackageReference Include="Serilog.Sinks.Seq" Version="9.0.0" />
23-
<PackageReference Include="HttpsRichardy.Federation.Sdk" Version="1.0.2" />
23+
<PackageReference Include="HttpsRichardy.Federation.Sdk" Version="4.2.0" />
2424
</ItemGroup>
2525

2626
<ItemGroup>

Boundaries/Comanda.Subscriptions/Source/Comanda.Subscriptions.WebApi/Extensions/OpenApiExtension.cs

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ public static void AddOpenApiSpecification(this IServiceCollection services)
2929
{
3030
ClientCredentials = new OpenApiOAuthFlow
3131
{
32-
TokenUrl = new Uri(settings.Federation.BaseUrl + "/api/v1/protocol/open-id/connect/token")
32+
TokenUrl = new Uri(settings.Federation.Authority + "/api/v1/protocol/open-id/connect/token")
3333
}
3434
}
3535
};
@@ -40,12 +40,6 @@ public static void AddOpenApiSpecification(this IServiceCollection services)
4040
[document.Components.SecuritySchemes[SecuritySchemes.Bearer]] = Array.Empty<string>(),
4141
});
4242

43-
document.Info.Contact = new OpenApiContact
44-
{
45-
Name = "vinder.io",
46-
Email = "vinder.desenvolvimento@gmail.com",
47-
};
48-
4943
return Task.CompletedTask;
5044
});
5145
});

Boundaries/Comanda.Subscriptions/Source/Comanda.Subscriptions.WebApi/Extensions/WebInfrastructureExtension.cs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,10 +20,11 @@ public static void AddWebComposition(this IServiceCollection services)
2020
services.AddOpenApiSpecification();
2121
services.AddFederation(options =>
2222
{
23-
options.BaseUrl = settings.Federation.BaseUrl;
23+
options.Authority = settings.Federation.Authority;
2424
options.ClientId = settings.Federation.ClientId;
2525
options.Realm = settings.Federation.Realm;
2626
options.ClientSecret = settings.Federation.ClientSecret;
27+
options.Audiences = settings.Federation.Audiences;
2728
});
2829
}
2930
}

Boundaries/Comanda.Subscriptions/Source/Comanda.Subscriptions.WebApi/appsettings.json

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,10 +5,11 @@
55
"DatabaseName": "${Settings__Database__DatabaseName}"
66
},
77
"Federation": {
8-
"BaseUrl": "${Settings__Federation__BaseUrl}",
8+
"Authority": "${Settings__Federation__Authority}",
99
"Realm": "${Settings__Federation__Realm}",
1010
"ClientId": "${Settings__Federation__ClientId}",
11-
"ClientSecret": "${Settings__Federation__ClientSecret}"
11+
"ClientSecret": "${Settings__Federation__ClientSecret}",
12+
"Audiences": [ "${Settings__Federation__Audiences__0}" ]
1213
},
1314
"Stripe": {
1415
"Secret": "${Settings__Stripe__Secret}"

0 commit comments

Comments
 (0)