Files
zeekay 98f0da7fa5 ci: amd64-only build (matches hanzo runner pool topology)
hanzo-build-linux-amd64 is the only ARC runner pool installed on
hanzo-k8s today (arm64 pool is paused until DigitalOcean ships
arm64 droplets, per ~/work/hanzo/.github/RUNNERS.md). The arm64
job was waiting on spark-hanzoai-arm64 — not provisioned in this
cluster — so every build sat in queue forever and the amd64 leg
got cancelled.

Set platforms: linux/amd64 on the reusable build call to skip
arm64 entirely. Re-add arm64 if/when DO ships arm64 droplets and
the spark runner pool comes back online.
2026-06-07 11:38:49 -07:00

36 lines
1.1 KiB
TypeScript

import { jackson } from "@/lib/jackson";
// Force-include crypto dependencies (same workaround as token route)
import * as jose from "jose";
import { NextResponse } from "next/server";
import * as openidClient from "openid-client";
const _dependencies = [jose, openidClient];
void _dependencies;
// Prevent Next.js from statically generating this route at build time —
// it requires a live database connection via Jackson.
export const dynamic = "force-dynamic";
export async function GET(req: Request) {
try {
const { oauthController } = await jackson();
const authHeader = req.headers.get("Authorization");
if (!authHeader) {
return NextResponse.json({ error: "Unauthorized" }, { status: 401 });
}
// RFC 6750: token type is case-insensitive
const token = authHeader.replace(/^bearer\s+/i, "");
const userInfo = await oauthController.userInfo(token);
return NextResponse.json(userInfo);
} catch (error: any) {
console.error("[SAML] UserInfo error:", error);
return NextResponse.json(
{ error: error.message || "Internal server error" },
{ status: 500 },
);
}
}