Support AutoDetect

This commit is contained in:
2025-09-11 15:43:11 +02:00
parent c23a43c84c
commit 5366cfbc60
9 changed files with 469 additions and 27 deletions

View File

@@ -134,10 +134,13 @@ public class JwtController : Controller
var tokenContent = tokenResponse as ContentResult;
if (tokenContent == null)
return tokenResponse;
var provider = HttpContext.RequestServices.GetService<DiscoveryWellKnownProvider>();
var wk = provider?.GetWellKnownJson(Request.Scheme, Request.Host.Value)
?? _configuration.GetValueOrDefault(nameof(AuthServiceConfiguration.WellKnown), string.Empty);
return Json(new AuthReplyDto
{
Token = tokenContent.Content,
WellKnown = _configuration.GetValueOrDefault(nameof(AuthServiceConfiguration.WellKnown), string.Empty),
WellKnown = wk,
});
}
@@ -189,5 +192,4 @@ public class JwtController : Controller
var handler = new JwtSecurityTokenHandler();
return handler.CreateJwtSecurityToken(token);
}
}
}