@kilterset/auth0-actions-testing
Version:
Test and develop Auth0 Actions or Okta CIC Actions locally.
35 lines • 1.1 kB
TypeScript
import { Request, User } from "../../types";
interface RedirectMockOptions {
readonly now?: ConstructorParameters<typeof Date>[0];
readonly request: Request;
readonly user: User;
}
interface EncodeTokenOptions {
expiresInSeconds?: number | undefined;
payload: {
[key: string]: unknown;
};
secret: string;
}
interface SendUserToOptions {
query?: Record<string, string>;
}
interface ValidateTokenOptions {
tokenParameterName?: string;
secret: string;
}
export declare function redirectMock(flow: string, { now: nowValue, request, user }: RedirectMockOptions): {
state: {
target: null | {
url: URL;
queryParams: Record<string, string>;
};
};
build: <T>(api: T) => {
encodeToken: ({ expiresInSeconds, payload, secret, }: EncodeTokenOptions) => string;
sendUserTo: (urlString: string, options?: SendUserToOptions) => T;
validateToken: ({ tokenParameterName, secret }: ValidateTokenOptions) => Record<string, unknown>;
};
};
export {};
//# sourceMappingURL=redirect.d.ts.map