Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 4 additions & 4 deletions Sources/asc-mcp/Services/JWTService.swift
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ public actor JWTService {
return Date(timeIntervalSince1970: TimeInterval(payload.exp))
} catch {
#if DEBUG
print("🔐 JWT: Failed to decode token payload: \(error)")
print("🔐 JWT: Failed to decode token payload: \(error)", to: &standardError)
#endif
return nil
}
Expand All @@ -123,12 +123,12 @@ public actor JWTService {
if timeUntilExpiry > tokenRefreshLeeway {
// Token is still valid
#if DEBUG
print("🔐 JWT: Using cached token (expires in \(Int(timeUntilExpiry))s)")
print("🔐 JWT: Using cached token (expires in \(Int(timeUntilExpiry))s)", to: &standardError)
#endif
return token
} else {
#if DEBUG
print("🔐 JWT: Token expires in \(Int(timeUntilExpiry))s, refreshing...")
print("🔐 JWT: Token expires in \(Int(timeUntilExpiry))s, refreshing...", to: &standardError)
#endif
}
}
Expand All @@ -140,7 +140,7 @@ public actor JWTService {
#if DEBUG
if let exp = decodeTokenExpiration(token) {
let duration = exp.timeIntervalSince(now)
print("🔐 JWT: Generated new token (valid for \(Int(duration))s)")
print("🔐 JWT: Generated new token (valid for \(Int(duration))s)", to: &standardError)
}
#endif

Expand Down
Loading
Loading