Skip to content

Commit

Permalink
release 8.0.6
Browse files Browse the repository at this point in the history
nuget packages versions updated
  • Loading branch information
Sergei Calabonga committed Sep 20, 2024
1 parent 15350d9 commit 638c747
Show file tree
Hide file tree
Showing 13 changed files with 106 additions and 91 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>8.0.5</PackageVersion>
<PackageVersion>8.0.6</PackageVersion>
<Title>Microservice template with OpenIddict</Title>
<Authors>Calabonga</Authors>
<Copyright>Calabonga SOFT © 2001 - $([System.DateTime]::Now.ToString(yyyy))</Copyright>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,15 +12,15 @@
<ItemGroup>
<PackageReference Include="Calabonga.Results" Version="1.1.0" />
<PackageReference Include="Calabonga.UnitOfWork" Version="4.0.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.7">
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.8">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="OpenIddict.EntityFrameworkCore" Version="5.7.0" />
<PackageReference Include="OpenIddict.EntityFrameworkCore" Version="5.8.0" />
<PackageReference Include="Calabonga.PredicatesBuilder" Version="2.0.1" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.8" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.8" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,22 +19,22 @@
<ItemGroup>
<PackageReference Include="Automapper" Version="13.0.1" />
<PackageReference Include="Calabonga.Microservices.Core" Version="5.1.0" />
<PackageReference Include="FluentValidation" Version="11.9.2" />
<PackageReference Include="FluentValidation" Version="11.10.0" />
<PackageReference Include="Calabonga.AspNetCore.AppDefinitions" Version="2.4.3" />
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.9.2" />
<PackageReference Include="MediatR" Version="12.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.7" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.7">
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.10.0" />
<PackageReference Include="MediatR" Version="12.4.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.8" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Design" Version="8.0.8">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="OpenIddict.AspNetCore" Version="5.7.0" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
<PackageReference Include="OpenIddict.AspNetCore" Version="5.8.0" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.2" />
<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" Version="6.6.2" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.7.3" />
<PackageReference Include="System.Linq.Async" Version="6.0.1" />
</ItemGroup>

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class SwaggerDefinition : 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 = "8.0.5";
public const string AppVersion = "8.0.6";

private const string _swaggerConfig = "/swagger/v1/swagger.json";

Expand Down
Original file line number Diff line number Diff line change
@@ -1,33 +1,33 @@
@page
@model Calabonga.Microservice.IdentityModule.Web.Pages.Connect.LoginModel
@{
ViewData["Title"] = "Log in";
}

<div class="row">
<div class="col-md-4 offset-4">
@if (Model.Input != null)
{
<form method="post">

<div class="col-md-4 offset-4">
@if (Model.Input != null)
{
<form method="post">
<input type="hidden" asp-for="@Model.Input.ReturnUrl" />

<input type="hidden" asp-for="@Model.Input.ReturnUrl)"/>
<div asp-validation-summary="All" class="text-danger"></div>

<div asp-validation-summary="All" class="text-danger"></div>
<div class="mb-3 row">
<label class="form-label" asp-for="@Model.Input.UserName"></label>
<input type="email" class="form-control" asp-for="@Model.Input.UserName">

<div class="mb-3 row">
<label class="form-label" asp-for="@Model.Input.UserName"></label>
<input type="email" class="form-control" asp-for="@Model.Input.UserName">
</div>

</div>
<div class="mb-3 row">
<label class="form-label" asp-for="@Model.Input.Password"></label>
<input class="form-control" type="password" asp-for="@Model.Input.Password" />

<div class="mb-3 row">
<label class="form-label" asp-for="@Model.Input.Password"></label>
<input class="form-control" type="password" asp-for="@Model.Input.Password"/>
</div>
<div class="text-center">
<button class="btn btn-primary" type="submit">Log in</button>
</div>

</div>
<div class="text-center">
<button class="btn btn-primary" type="submit">Вход</button>
</div>

</form>
}
</div>
</div>
</form>
}
</div>
Original file line number Diff line number Diff line change
Expand Up @@ -7,55 +7,65 @@
using Microsoft.AspNetCore.Mvc;
using Microsoft.AspNetCore.Mvc.RazorPages;

namespace Calabonga.Microservice.IdentityModule.Web.Pages.Connect;

[AllowAnonymous]
public class LoginModel(
IAccountService accountService,
SignInManager<ApplicationUser> signInManager,
UserManager<ApplicationUser> userManager)
: PageModel
namespace Calabonga.Microservice.IdentityModule.Web.Pages.Connect
{
[BindProperty(SupportsGet = true)] public string ReturnUrl { get; set; } = null!;

[BindProperty] public LoginViewModel? Input { get; set; }

public void OnGet() => Input = new LoginViewModel
[AllowAnonymous]
public class LoginModel : PageModel
{
ReturnUrl = ReturnUrl
};
private readonly IAccountService _accountService;
private readonly SignInManager<ApplicationUser> _signInManager;
private readonly UserManager<ApplicationUser> _userManager;

public async Task<IActionResult> OnPostAsync()
{
if (!ModelState.IsValid)
public LoginModel(IAccountService accountService,
SignInManager<ApplicationUser> signInManager,
UserManager<ApplicationUser> userManager)
{
return Page();
_accountService = accountService;
_signInManager = signInManager;
_userManager = userManager;
}

if (Input != null)
[BindProperty(SupportsGet = true)] public string ReturnUrl { get; set; } = null!;

[BindProperty] public LoginViewModel? Input { get; set; }

public void OnGet() => Input = new LoginViewModel { ReturnUrl = ReturnUrl };

public async Task<IActionResult> OnPostAsync()
{
var user = await userManager.FindByNameAsync(Input.UserName);
if (user == null)
if (!ModelState.IsValid)
{
ModelState.AddModelError("UserName", "User not found");
return Page();
}

var signInResult = await signInManager.PasswordSignInAsync(user, Input.Password, true, false);
if (signInResult.Succeeded)
if (Input != null)
{
var principal = await accountService.GetPrincipalByIdAsync(user.Id.ToString());
await HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, principal);
var user = await _userManager.FindByNameAsync(Input.UserName);
if (user == null)
{
ModelState.AddModelError("UserName", "User not found");

if (Url.IsLocalUrl(ReturnUrl))
return Page();
}

var signInResult = await _signInManager.PasswordSignInAsync(user, Input.Password, true, false);
if (signInResult.Succeeded)
{
return Redirect(ReturnUrl);
var principal = await _accountService.GetPrincipalByIdAsync(user.Id.ToString());
await HttpContext.SignInAsync(CookieAuthenticationDefaults.AuthenticationScheme, principal);

if (Url.IsLocalUrl(ReturnUrl))
{
return Redirect(ReturnUrl);
}

return RedirectToPage("/swagger");
}
return RedirectToPage("/swagger");
}
}

ModelState.AddModelError("UserName", "User not found");
return Page();
ModelState.AddModelError("UserName", "User not found");

return Page();
}
}
}
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Name: Template for Micro service on ASP.NET Core API with
// OpenIddict (OAuth2.0)
// Author: Calabonga © 2005-2024 Calabonga SOFT
// Version: 8.0.5
// Version: 8.0.6
// Based on: .NET 8.0.x
// Created Date: 2023-11-19
// Updated Date: 2024-07-23
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>8.0.5</PackageVersion>
<PackageVersion>8.0.6</PackageVersion>
<Title>Microservice template</Title>
<Authors>Calabonga</Authors>
<Copyright>Calabonga SOFT © 2001 - $([System.DateTime]::Now.ToString(yyyy))</Copyright>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,9 +14,9 @@
<PackageReference Include="Calabonga.UnitOfWork" Version="4.0.0" />
<PackageReference Include="Calabonga.PredicatesBuilder" Version="2.0.1" />
<PackageReference Include="Calabonga.Microservices.Core" Version="5.1.0" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore" Version="8.0.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.InMemory" Version="8.0.8" />
<PackageReference Include="Microsoft.AspNetCore.Identity.EntityFrameworkCore" Version="8.0.8" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,24 @@
<ItemGroup>
<PackageReference Include="Automapper" Version="13.0.1" />
<PackageReference Include="Calabonga.AspNetCore.AppDefinitions" Version="2.4.3" />
<PackageReference Include="FluentValidation" Version="11.9.2" />
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.9.2" />
<PackageReference Include="MediatR" Version="12.3.0" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.7" />
<PackageReference Include="Microsoft.AspNetCore.Components.QuickGrid.EntityFrameworkAdapter" Version="8.0.7" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.7" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.7">
<PackageReference Include="FluentValidation" Version="11.10.0" />
<PackageReference Include="FluentValidation.DependencyInjectionExtensions" Version="11.10.0" />
<PackageReference Include="MediatR" Version="12.4.1" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.OpenIdConnect" Version="8.0.8" />
<PackageReference Include="Microsoft.AspNetCore.Authentication.JwtBearer" Version="8.0.8" />
<PackageReference Include="Microsoft.AspNetCore.Components.QuickGrid.EntityFrameworkAdapter" Version="8.0.8" />
<PackageReference Include="Microsoft.AspNetCore.OpenApi" Version="8.0.8" />
<PackageReference Include="Microsoft.EntityFrameworkCore.Tools" Version="8.0.8">
<PrivateAssets>all</PrivateAssets>
<IncludeAssets>runtime; build; native; contentfiles; analyzers; buildtransitive</IncludeAssets>
</PackageReference>
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.3" />
<PackageReference Include="OpenIddict.AspNetCore" Version="5.7.0" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.1" />
<PackageReference Include="Microsoft.VisualStudio.Web.CodeGeneration.Design" Version="8.0.5" />
<PackageReference Include="OpenIddict.AspNetCore" Version="5.8.0" />
<PackageReference Include="Serilog.AspNetCore" Version="8.0.2" />
<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" Version="6.6.2" />
<PackageReference Include="Swashbuckle.AspNetCore" Version="6.7.3" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ public class SwaggerDefinition : 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}";
private const string _appVersion = "8.0.5";
private const string _appVersion = "8.0.6";

private const string _swaggerConfig = "/swagger/v1/swagger.json";

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
// Name: Template for Micro service on ASP.NET Core API with
// OpenIddict (OAuth2.0)
// Author: Calabonga © 2005-2023 Calabonga SOFT
// Version: 8.0.5
// Version: 8.0.6
// Based on: .NET 8.0.x
// Created Date: 2023-11-19
// Updated Date: 2024-07-23
Expand Down
5 changes: 5 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,11 @@ To install version 8.x please, read [wiki](https://github.com/Calabonga/Microser

## История Nimble Framework

### 2024-09-20 Версия 8.0.6

* Обновились nuget-пакеты в проекте `IdentityModule`
* Обновились nuget-пакеты в проекте `Module`.

### 2024-07-23 Версия 8.0.5

* Обновились nuget-пакеты в проекте `IdentityModule`
Expand Down

0 comments on commit 638c747

Please sign in to comment.