@registeragent/next
v0.1.1
Published
AIP verification middleware for Next.js applications
Readme
@registeragent/next
AIP verification middleware for Next.js applications.
Install
npm install @registeragent/nextUsage
import { withAip, getAipIdentity } from "@registeragent/next";
// Route handler with middleware
export const GET = withAip(
{ issuerUrl: "https://registeragent.id", audience: "https://example.com" },
async (request) => {
const identity = await getAipIdentity(request);
return Response.json({ entityId: identity.entityId });
}
);
// Manual use
const identity = await getAipIdentity(request, config);Links
License
MIT
