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

View File

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