mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 22:37:03 +00:00
Fix openid verifyAssertion callback signature (#36487)
This commit is contained in:
committed by
Benjamin Lichtman
parent
2335bc0528
commit
c4686d3e82
Vendored
+21
-14
@@ -1,6 +1,7 @@
|
||||
// Type definitions for openid 2.0
|
||||
// Project: https://github.com/havard/node-openid
|
||||
// Definitions by: Jacob Stein <https://github.com/jacobmstein>
|
||||
// Joao Dias <https://github.com/alfaproject>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
// TypeScript Version: 3.4
|
||||
|
||||
@@ -9,19 +10,25 @@ export interface OpenIdError {
|
||||
}
|
||||
|
||||
export class RelyingParty {
|
||||
constructor(
|
||||
returnUrl: string,
|
||||
realm: string | null,
|
||||
stateless: boolean,
|
||||
strict: boolean,
|
||||
extensions: readonly any[]);
|
||||
constructor(
|
||||
returnUrl: string,
|
||||
realm: string | null,
|
||||
stateless: boolean,
|
||||
strict: boolean,
|
||||
extensions: readonly any[]
|
||||
);
|
||||
|
||||
authenticate(
|
||||
identifier: string,
|
||||
immediate: boolean,
|
||||
callback: (err: OpenIdError | null, authUrl: string | null) => void): void;
|
||||
authenticate(
|
||||
identifier: string,
|
||||
immediate: boolean,
|
||||
callback: (err: OpenIdError | null, authUrl: string | null) => void
|
||||
): void;
|
||||
|
||||
verifyAssertion(
|
||||
requestOrUrl: object | string,
|
||||
callback: (err: OpenIdError | null) => void): void;
|
||||
}
|
||||
verifyAssertion(
|
||||
requestOrUrl: object | string,
|
||||
callback: (
|
||||
err: OpenIdError | null,
|
||||
result?: { authenticated: boolean; claimedIdentifier?: string }
|
||||
) => void
|
||||
): void;
|
||||
}
|
||||
|
||||
@@ -9,4 +9,4 @@ const relyingParty = new openid.RelyingParty(
|
||||
|
||||
relyingParty.authenticate('...', false, (err, authUrl) => {});
|
||||
|
||||
relyingParty.verifyAssertion('...', (err) => {});
|
||||
relyingParty.verifyAssertion('...', (err, result) => {});
|
||||
|
||||
Reference in New Issue
Block a user