Merge pull request #904 from hargata/Hargata/oidc.check.claims

add openid troubleshooting mode.
This commit is contained in:
Hargata Softworks
2025-03-30 20:40:38 -06:00
committed by GitHub
2 changed files with 5 additions and 0 deletions

View File

@@ -136,6 +136,10 @@ namespace CarCareTracker.Controllers
//validate JWT token
var tokenParser = new JwtSecurityTokenHandler();
var parsedToken = tokenParser.ReadJwtToken(userJwt);
if (openIdConfig.TroubleshootingMode)
{
_logger.LogInformation($"OpenID Troubleshooting Mode Enabled - Token: {userJwt}");
}
var userEmailAddress = string.Empty;
if (parsedToken.Claims.Any(x => x.Type == "email"))
{

View File

@@ -15,6 +15,7 @@
public bool DisableRegularLogin { get; set; } = false;
public bool UsePKCE { get; set; } = false;
public string LogOutURL { get; set; } = "";
public bool TroubleshootingMode { get; set; } = false;
public string RemoteAuthURL { get {
var redirectUrl = $"{AuthURL}?client_id={ClientId}&response_type=code&redirect_uri={RedirectURL}&scope={Scope}&state={State}";
if (UsePKCE)