Files
DefinitelyTyped/types/saml20/index.d.ts
HackerUndKoch 1c793324df Add types for "saml20" (#18409)
* add saml20 typings

* Fix  index to meet linting requirements

* Fix  ParseCallback argument type

* Remove weird Mac chars
2017-07-26 10:35:10 -07:00

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;