-
Notifications
You must be signed in to change notification settings - Fork 84
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
34 changed files
with
422 additions
and
651 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,8 +1,29 @@ | ||
// @ts-nocheck | ||
import Recipe from "./recipe"; | ||
import { RecipeInterface, APIInterface, APIOptions } from "./types"; | ||
import { RecipeInterface, APIInterface, APIOptions, ProviderConfigWithOIDCInfo, OAuthTokens } from "./types"; | ||
export default class Wrapper { | ||
static init: typeof Recipe.init; | ||
static getAuthorisationRedirectURL(input: { | ||
redirectURIOnProviderDashboard: string; | ||
}): Promise<{ | ||
urlWithQueryParams: string; | ||
pkceCodeVerifier?: string | undefined; | ||
}>; | ||
static exchangeAuthCodeForOAuthTokens(input: { | ||
providerConfig: ProviderConfigWithOIDCInfo; | ||
redirectURIInfo: { | ||
redirectURIOnProviderDashboard: string; | ||
redirectURIQueryParams: any; | ||
pkceCodeVerifier?: string | undefined; | ||
}; | ||
}): Promise<import("./types").OAuthTokenResponse>; | ||
static getUserInfo(input: { | ||
providerConfig: ProviderConfigWithOIDCInfo; | ||
oAuthTokens: OAuthTokens; | ||
}): Promise<import("./types").UserInfo>; | ||
} | ||
export declare let init: typeof Recipe.init; | ||
export declare let getAuthorisationRedirectURL: typeof Wrapper.getAuthorisationRedirectURL; | ||
export declare let exchangeAuthCodeForOAuthTokens: typeof Wrapper.exchangeAuthCodeForOAuthTokens; | ||
export declare let getUserInfo: typeof Wrapper.getUserInfo; | ||
export type { RecipeInterface, APIInterface, APIOptions }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,40 +1,7 @@ | ||
// @ts-nocheck | ||
import { NormalisedAppinfo } from "../../types"; | ||
import { TypeInput, TypeNormalisedInput } from "./types"; | ||
import * as jose from "jose"; | ||
export declare function validateAndNormaliseUserInput( | ||
_appInfo: NormalisedAppinfo, | ||
config: TypeInput | ||
): TypeNormalisedInput; | ||
export declare function doGetRequest( | ||
url: string, | ||
queryParams?: { | ||
[key: string]: string; | ||
}, | ||
headers?: { | ||
[key: string]: string; | ||
} | ||
): Promise<{ | ||
jsonResponse: Record<string, any> | undefined; | ||
status: number; | ||
stringResponse: string; | ||
}>; | ||
export declare function doPostRequest( | ||
url: string, | ||
params: { | ||
[key: string]: any; | ||
}, | ||
headers?: { | ||
[key: string]: string; | ||
} | ||
): Promise<{ | ||
jsonResponse: Record<string, any> | undefined; | ||
status: number; | ||
stringResponse: string; | ||
}>; | ||
export declare function verifyIdTokenFromJWKSEndpointAndGetPayload( | ||
idToken: string, | ||
jwks: jose.JWTVerifyGetKey, | ||
otherOptions: jose.JWTVerifyOptions | ||
): Promise<any>; | ||
export declare function getOIDCDiscoveryInfo(issuer: string): Promise<any>; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,35 +1,3 @@ | ||
// @ts-nocheck | ||
import * as jose from "jose"; | ||
import { ProviderConfigForClientType } from "../types"; | ||
export declare function doGetRequest( | ||
url: string, | ||
queryParams?: { | ||
[key: string]: string; | ||
}, | ||
headers?: { | ||
[key: string]: string; | ||
} | ||
): Promise<{ | ||
jsonResponse: Record<string, any> | undefined; | ||
status: number; | ||
stringResponse: string; | ||
}>; | ||
export declare function doPostRequest( | ||
url: string, | ||
params: { | ||
[key: string]: any; | ||
}, | ||
headers?: { | ||
[key: string]: string; | ||
} | ||
): Promise<{ | ||
jsonResponse: Record<string, any> | undefined; | ||
status: number; | ||
stringResponse: string; | ||
}>; | ||
export declare function verifyIdTokenFromJWKSEndpointAndGetPayload( | ||
idToken: string, | ||
jwks: jose.JWTVerifyGetKey, | ||
otherOptions: jose.JWTVerifyOptions | ||
): Promise<any>; | ||
export declare function discoverOIDCEndpoints(config: ProviderConfigForClientType): Promise<void>; |
Oops, something went wrong.