mirror of
https://github.com/zhigang1992/DefinitelyTyped.git
synced 2026-04-12 22:36:10 +08:00
* add saml20 typings * Fix index to meet linting requirements * Fix ParseCallback argument type * Remove weird Mac chars
31 lines
949 B
TypeScript
31 lines
949 B
TypeScript
// Type definitions for saml20 0.1
|
|
// Project: https://github.com/leandrob/saml20
|
|
// Definitions by: Jan Petzold <https://github.com/HackerUndKoch>
|
|
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
|
|
|
export interface Profile {
|
|
issuer: string;
|
|
claims: any;
|
|
audience?: string;
|
|
sessionIndex?: string; // only SAML 2.0
|
|
}
|
|
|
|
export type ValidationOptions = ValidationOptionsWithKey | ValidationOptionsWithPrint;
|
|
|
|
export interface ValidationOptionsWithKey {
|
|
publicKey: string;
|
|
bypassExpiration?: boolean;
|
|
audience?: any;
|
|
}
|
|
|
|
export interface ValidationOptionsWithPrint {
|
|
thumbprint: string;
|
|
bypassExpiration?: boolean;
|
|
audience?: any;
|
|
}
|
|
|
|
export type ParseCallback = (err: Error | null, profile: Profile, version: string) => void;
|
|
|
|
export function parse(rawAssertion: string, cb: ParseCallback): void;
|
|
export function validate(rawAssertion: string, options: ValidationOptions, cb: ParseCallback): void;
|