mirror of
https://github.com/hargata/lubelog.git
synced 2025-12-10 00:46:08 -06:00
30 lines
1.2 KiB
C#
30 lines
1.2 KiB
C#
namespace CarCareTracker.Models
|
|
{
|
|
public class OpenIDConfig
|
|
{
|
|
public string Name { get; set; }
|
|
public string ClientId { get; set; }
|
|
public string ClientSecret { get; set; }
|
|
public string AuthURL { get; set; }
|
|
public string TokenURL { get; set; }
|
|
public string RedirectURL { get; set; }
|
|
public string Scope { get; set; } = "openid email";
|
|
public string State { get; set; }
|
|
public string CodeChallenge { get; set; }
|
|
public bool ValidateState { get; set; } = false;
|
|
public bool DisableRegularLogin { get; set; } = false;
|
|
public bool UsePKCE { get; set; } = false;
|
|
public string LogOutURL { get; set; } = "";
|
|
public string UserInfoURL { get; set; } = "";
|
|
public string JwksURL { get; set; } = "";
|
|
public string RemoteAuthURL { get {
|
|
var redirectUrl = $"{AuthURL}?client_id={ClientId}&response_type=code&redirect_uri={RedirectURL}&scope={Scope}&state={State}";
|
|
if (UsePKCE)
|
|
{
|
|
redirectUrl += $"&code_challenge={CodeChallenge}&code_challenge_method=S256";
|
|
}
|
|
return redirectUrl;
|
|
} }
|
|
}
|
|
}
|