feat: completed backend code for oidc permission inject

This commit is contained in:
=
2025-03-14 22:11:22 +05:30
parent 5ebf142e3e
commit 1da5a5f417
17 changed files with 139 additions and 28 deletions
@@ -1,3 +1,4 @@
import { requestContext } from "@fastify/request-context";
import { FastifyRequest } from "fastify";
import fp from "fastify-plugin";
import jwt, { JwtPayload } from "jsonwebtoken";
@@ -137,6 +138,10 @@ export const injectIdentity = fp(async (server: FastifyZodProvider) => {
identityName: identity.name,
authMethod: null
};
requestContext.set("identityAuthInfo", {
identityId: identity.identityId,
oidc: token?.identityAuth?.oidc
});
break;
}
case AuthMode.SERVICE_TOKEN: {