POC oidc login
This commit is contained in:
parent
6288d89651
commit
df9d970a42
48 changed files with 5009 additions and 96 deletions
23
API/Controllers/OidcControlller.cs
Normal file
23
API/Controllers/OidcControlller.cs
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
using System.Threading.Tasks;
|
||||
using API.Data;
|
||||
using API.DTOs.Settings;
|
||||
using Microsoft.AspNetCore.Authorization;
|
||||
using Microsoft.AspNetCore.Mvc;
|
||||
using Microsoft.Extensions.Logging;
|
||||
|
||||
namespace API.Controllers;
|
||||
|
||||
[AllowAnonymous]
|
||||
public class OidcController(ILogger<OidcController> logger, IUnitOfWork unitOfWork): BaseApiController
|
||||
{
|
||||
|
||||
// TODO: Decide what we want to expose here, not really anything useful in it. But the discussion is needed
|
||||
// Public endpoint
|
||||
[HttpGet("config")]
|
||||
public async Task<ActionResult<OidcConfigDto>> GetOidcConfig()
|
||||
{
|
||||
var settings = await unitOfWork.SettingsRepository.GetSettingsDtoAsync();
|
||||
return Ok(settings.OidcConfig);
|
||||
}
|
||||
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue