whodis-sdk
Version:
A simple sdk for easy, secure authentication with the whodis platform. Setup secure authentication for your app in seconds.
18 lines (17 loc) • 606 B
TypeScript
import { LogMethod } from 'simple-leveled-log-methods';
import { WhodisAuthTokenClaims } from '../../domain';
/**
* extracts authenticated user data from the auth token found in the headers, if any exists
*
* additionally, monitors authentication errors to proactively help with debugging and detect potential security attacks
*/
export declare const getAuthedClaimsFromHeaders: ({ headers, config, log, }: {
headers: Record<string, any>;
config: {
issuer: string;
audience: string;
};
log: {
warn: LogMethod;
};
}) => Promise<WhodisAuthTokenClaims | null>;