refactor(Consumer): Eigenschaft CookieOptionsProvider hinzugefügt.
This commit is contained in:
parent
79e3dbd5d8
commit
17c00240a6
@ -1,4 +1,6 @@
|
|||||||
namespace DigitalData.Auth.API.Config
|
using DigitalData.Auth.API.Entities;
|
||||||
|
|
||||||
|
namespace DigitalData.Auth.API.Config
|
||||||
{
|
{
|
||||||
public class AuthApiParams
|
public class AuthApiParams
|
||||||
{
|
{
|
||||||
|
|||||||
@ -74,7 +74,7 @@ namespace DigitalData.Auth.API.Controllers
|
|||||||
|
|
||||||
private async Task<IActionResult> CreateTokenAsync(ConsumerLogin login, bool cookie = true)
|
private async Task<IActionResult> CreateTokenAsync(ConsumerLogin login, bool cookie = true)
|
||||||
{
|
{
|
||||||
var api = await _consumerService.ReadByIdAsync(login.Id);
|
var api = await _consumerService.ReadByNameAsync(login.Name);
|
||||||
|
|
||||||
if (api is null || api.Password != login.Password)
|
if (api is null || api.Password != login.Password)
|
||||||
return Unauthorized();
|
return Unauthorized();
|
||||||
|
|||||||
@ -1,4 +1,7 @@
|
|||||||
namespace DigitalData.Auth.API.Entities
|
namespace DigitalData.Auth.API.Entities
|
||||||
{
|
{
|
||||||
public record Consumer(int Id, string Name, string Password, string Audience);
|
public record Consumer(int Id, string Name, string Password, string Audience)
|
||||||
|
{
|
||||||
|
public CookieOptionsProvider? CookieOptions { get; set; }
|
||||||
|
}
|
||||||
}
|
}
|
||||||
@ -1,4 +1,4 @@
|
|||||||
namespace DigitalData.Auth.API.Config
|
namespace DigitalData.Auth.API.Entities
|
||||||
{
|
{
|
||||||
public class CookieOptionsProvider
|
public class CookieOptionsProvider
|
||||||
{
|
{
|
||||||
Loading…
x
Reference in New Issue
Block a user