@cryptr/cryptr-spa-js
Version:
Cryptr SDK for Single Page Applications using passwordless authentication and/or SSO
23 lines (22 loc) • 1.76 kB
TypeScript
import { Sign } from './types';
import * as I from './interfaces';
export declare const newTransaction: (signType: Sign, scope: string, redirect_uri: string, locale: string) => I.Transaction;
export declare const newTransactionWithState: (signType: Sign, scope: string, state: string, redirect_uri: string, locale: string) => I.Transaction;
export declare const ssoSignPath: (idpId: string) => string;
export declare const signPath: (config: I.Config, transaction: I.Transaction) => string;
export declare const transactionKey: (state: string) => string;
export declare const setTransactionKey: (transaction: I.Transaction) => string;
export declare const refreshKey: () => string;
export declare const validateAndFormatAuthResp: (config: I.Config, accessToken?: string, idToken?: string, refreshToken?: string, organization_domain?: string) => {
valid: boolean;
accessToken: string;
idToken: string;
refreshToken: string;
errors: I.TokenError[];
};
export declare const getRefreshParameters: (resp: any) => I.RefreshParameters;
export declare const parseTokensAndStoreRefresh: (config: any, response: any, transaction: any, opts: any) => I.TokenResult;
export declare const handlePostUniversalAuthorizationCode: (response: any, errors: I.TokenError[], accessResult: I.TokenResult, transaction: I.Transaction, config: I.Config, organization_domain?: string) => I.TokenResult;
export declare const handlePostAuthorizationCode: (response: any, errors: I.TokenError[], accessResult: I.TokenResult, transaction: I.Transaction, config: I.Config, organization_domain?: string) => I.TokenResult;
export declare const validatesNonce: (transaction: I.Transaction, submittedNonce: string) => void | true;
export declare const tomorrowDate: () => Date;