Skip to content

Commit

Permalink
update Authorization Code Flow
Browse files Browse the repository at this point in the history
  • Loading branch information
Calabonga committed Dec 13, 2024
1 parent 78db9ea commit a345316
Show file tree
Hide file tree
Showing 11 changed files with 22 additions and 18 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- The package metadata. Fill in the properties marked as TODO below -->
<!-- Follow the instructions on https://learn.microsoft.com/en-us/nuget/create-packages/package-authoring-best-practices -->
<PackageId>Calabonga.Microservice.IdentityModule.Template</PackageId>
<PackageVersion>9.0.0</PackageVersion>
<PackageVersion>9.0.1</PackageVersion>
<Title>Microservice template with OpenIddict</Title>
<Authors>Calabonga</Authors>
<Copyright>Calabonga SOFT © 2019 - $([System.DateTime]::Now.ToString(yyyy))</Copyright>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -28,11 +28,11 @@
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="OpenIddict.AspNetCore" Version="5.8.0" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.3" />
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" />
<PackageReference Include="Serilog.Formatting.Compact" Version="3.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="7.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="7.2.0" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class OpenApiDefinition : AppDefinition
// Otherwise, you can change versions of your API by manually.
// If you are not going to use git-versioning, do not forget install package "GitInfo"
// private const string AppVersion = $"{ThisAssembly.Git.SemVer.Major}.{ThisAssembly.Git.SemVer.Minor}.{ThisAssembly.Git.SemVer.Patch}";
public const string AppVersion = "9.0.0";
public const string AppVersion = "9.0.1";

private const string _openApiConfig = "/openapi/v1.json";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,8 @@ public override void ConfigureServices(WebApplicationBuilder builder)
.EnableAuthorizationEndpointPassthrough()
.DisableTransportSecurityRequirement();

//JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear();
//JwtSecurityTokenHandler.DefaultOutboundClaimTypeMap.Clear();
// JwtSecurityTokenHandler.DefaultInboundClaimTypeMap.Clear();
// JwtSecurityTokenHandler.DefaultOutboundClaimTypeMap.Clear();

//options.AddEventHandler<OpenIddictServerEvents.ProcessSignInContext>(builder =>
//{
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -50,9 +50,8 @@ await manager.CreateAsync(new OpenIddictApplicationDescriptor
ClientSecret = "client-secret-code",
DisplayName = "API testing clients with Authorization Code Flow demonstration",
RedirectUris = {
new Uri("https://localhost:7207/signin-oidc"),
new Uri("https://www.thunderclient.com/oauth/callback"), // https://www.thunderclient.com/
new Uri($"{url}/swagger/oauth2-redirect.html"), // https://swagger.io/
new Uri($"{url}/swagger/oauth2-redirect.html"), // https://swagger.io/ for IdentityModule as Example
new Uri("https://localhost:20001/swagger/oauth2-redirect.html") // https://swagger.io/ for Module as Example
},
PostLogoutRedirectUris =
Expand All @@ -75,7 +74,6 @@ await manager.CreateAsync(new OpenIddictApplicationDescriptor
OpenIddictConstants.Permissions.Prefixes.Scope + "api",
OpenIddictConstants.Permissions.Prefixes.Scope + "custom",
OpenIddictConstants.Permissions.Scopes.Email,
OpenIddictConstants.Permissions.Scopes.Address,
OpenIddictConstants.Permissions.Scopes.Profile,
OpenIddictConstants.Permissions.Scopes.Roles,

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,14 @@

Please find out all comments with 'ATTENTION!' because that is required some decisions from you.

# About
# About template

| Name | Description |
| ------------ | ------------------------------------------ |
| Name | Microservice Template for ASP.NET Core API |
| Author | Calabonga SOFT © 2005-2024 Calabonga SOFT |
| Created Date | 2024-11-26 |
| Create From | Microservice-Template NET8.0 |
| Create From | Microservice-Template NET 8.0 |

# Versions

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
<!-- The package metadata. Fill in the properties marked as TODO below -->
<!-- Follow the instructions on https://learn.microsoft.com/en-us/nuget/create-packages/package-authoring-best-practices -->
<PackageId>Calabonga.Microservice.Module.Template</PackageId>
<PackageVersion>9.0.0</PackageVersion>
<PackageVersion>9.0.1</PackageVersion>
<Title>Microservice template</Title>
<Authors>Calabonga</Authors>
<Copyright>Calabonga SOFT © 2019 - $([System.DateTime]::Now.ToString(yyyy))</Copyright>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,11 @@
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="9.0.0" />
<PackageReference Include="OpenIddict.AspNetCore" Version="5.8.0" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.3" />
<PackageReference Include="Serilog.AspNetCore" Version="9.0.0" />
<PackageReference Include="Serilog.Formatting.Compact" Version="3.0.0" />
<PackageReference Include="Serilog.Sinks.Console" Version="6.0.0" />
<PackageReference Include="Serilog.Sinks.File" Version="6.0.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="7.1.0" />
<PackageReference Include="Swashbuckle.AspNetCore.SwaggerUI" Version="7.2.0" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ public class OpenApiDefinition : AppDefinition
// Otherwise, you can change versions of your API by manually.
// If you are not going to use git-versioning, do not forget install package "GitInfo"
// private const string AppVersion = $"{ThisAssembly.Git.SemVer.Major}.{ThisAssembly.Git.SemVer.Minor}.{ThisAssembly.Git.SemVer.Patch}";
public const string AppVersion = "9.0.0";
public const string AppVersion = "9.0.1";

private const string _openApiConfig = "/openapi/v1.json";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,14 +2,13 @@

Please find out all comments with 'ATTENTION!' because that is required some decisions from you.

# About

# About template
| Name | Description |
| ------------ | ------------------------------------------ |
| Name | Microservice Template for ASP.NET Core API |
| Author | Calabonga SOFT © 2005-2024 Calabonga SOFT |
| Created Date | 2024-11-26 |
| Create From | Microservice-Template NET8.0 |
| Create From | Microservice-Template NET 8.0 |

# Versions

Expand Down
7 changes: 7 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,13 @@ To install templates (`Visual Studio`, `Rider`, `dotnet CLI`) please, read [wiki

## История Nimble Framework

### 2024-12-13 Версия 9.0.1

* Подключен `EnableLogoutEndpointPassthrough` endpoint, а также `SetIntrospectionEndpointUris`.
* Подключена поддержка `PKCE` для `Authorization Code Flow`.
* Обновились nuget-пакеты в проекте `IdentityModule`.
* Обновились nuget-пакеты в проекте `Module`.

### 2024-11-26 Версия 9.0.0

* Обновилась версия платформы NET9.0, установлены nuget-пакеты, соответствующие версии.
Expand Down

0 comments on commit a345316

Please sign in to comment.