Добавьте файлы проекта.
This commit is contained in:
19
Yuna.OauthServer/Endpoints/Auth/AuthEndpoints.cs
Normal file
19
Yuna.OauthServer/Endpoints/Auth/AuthEndpoints.cs
Normal file
@ -0,0 +1,19 @@
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Yuna.OauthServer.Endpoints.Auth.DTO;
|
||||
|
||||
namespace Yuna.OauthServer.Endpoints.Auth
|
||||
{
|
||||
public class AuthEndpoints
|
||||
{
|
||||
public void Define(WebApplication app)
|
||||
{
|
||||
app.MapGet("oauth/auth", Authorize)
|
||||
}
|
||||
|
||||
public IResult Authorize([AsParameters] AuthRequest request)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
}
|
14
Yuna.OauthServer/Endpoints/Auth/DTO/AuthRequest.cs
Normal file
14
Yuna.OauthServer/Endpoints/Auth/DTO/AuthRequest.cs
Normal file
@ -0,0 +1,14 @@
|
||||
using Microsoft.AspNetCore.Components;
|
||||
using System.Text.Json.Serialization;
|
||||
|
||||
namespace Yuna.OauthServer.Endpoints.Auth.DTO
|
||||
{
|
||||
|
||||
public class AuthRequest
|
||||
{
|
||||
public string response_type { get; set; } = null!;
|
||||
public string client_id { get; set; } = null!;
|
||||
public string redirect_uri { get; set; } = null!;
|
||||
|
||||
}
|
||||
}
|
9
Yuna.OauthServer/Endpoints/Auth/DTO/AuthResponse.cs
Normal file
9
Yuna.OauthServer/Endpoints/Auth/DTO/AuthResponse.cs
Normal file
@ -0,0 +1,9 @@
|
||||
namespace Yuna.OauthServer.Endpoints.Auth.DTO
|
||||
{
|
||||
public class AuthResponse
|
||||
{
|
||||
public string ResponseType { get;} = "code";
|
||||
public string Code { get; set; } = null!;
|
||||
public string RedirectUri { get; set; } = null!;
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user