🐛 Fix compile failed

This commit is contained in:
2025-08-16 14:35:06 +08:00
parent 5d13f08d47
commit 614c77d7ce
2 changed files with 9 additions and 11 deletions

View File

@@ -157,14 +157,14 @@ public class DysonTokenAuthHandler(
{ {
// Handle JWT tokens (3 parts) // Handle JWT tokens (3 parts)
case 3: case 3:
{ {
var (isValid, jwtResult) = oidc.ValidateToken(token); var (isValid, jwtResult) = oidc.ValidateToken(token);
if (!isValid) return false; if (!isValid) return false;
var jti = jwtResult?.Claims.FirstOrDefault(c => c.Type == "jti")?.Value; var jti = jwtResult?.Claims.FirstOrDefault(c => c.Type == "jti")?.Value;
if (jti is null) return false; if (jti is null) return false;
return Guid.TryParse(jti, out sessionId); return Guid.TryParse(jti, out sessionId);
} }
// Handle compact tokens (2 parts) // Handle compact tokens (2 parts)
case 2: case 2:
// Original compact token validation logic // Original compact token validation logic
@@ -190,8 +190,6 @@ public class DysonTokenAuthHandler(
{ {
return false; return false;
} }
break;
default: default:
return false; return false;
} }

View File

@@ -19,7 +19,7 @@ public class OidcProviderController(
AppDatabase db, AppDatabase db,
OidcProviderService oidcService, OidcProviderService oidcService,
IConfiguration configuration, IConfiguration configuration,
IOptions<OidcProviderOptions> options, IOptions<OidcProviderOptions> options
) )
: ControllerBase : ControllerBase
{ {