diff --git a/package-lock.json b/package-lock.json index 8bc8ff57..d9d3e715 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10028,11 +10028,10 @@ } }, "node_modules/@fingerprintjs/fingerprintjs": { - "version": "3.4.2", - "license": "MIT", - "dependencies": { - "tslib": "^2.4.1" - } + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/@fingerprintjs/fingerprintjs/-/fingerprintjs-5.0.1.tgz", + "integrity": "sha512-KbaeE/rk2WL8MfpRP6jTI4lSr42SJPjvkyrjP3QU6uUDkOMWWYC2Ts1sNSYcegHC8avzOoYTHBj+2fTqvZWQBA==", + "license": "MIT" }, "node_modules/@humanwhocodes/config-array": { "version": "0.13.0", @@ -16929,9 +16928,9 @@ } }, "node_modules/detectincognitojs": { - "version": "1.3.7", - "resolved": "https://registry.npmjs.org/detectincognitojs/-/detectincognitojs-1.3.7.tgz", - "integrity": "sha512-8Z90m1utiUMr0hz0eYqg1x0P5uM6hSqGe0TdLtZGunDEptoaoYmcWKbk2qmAezilErNbY9hmqcdNIYooUc925w==", + "version": "1.6.2", + "resolved": "https://registry.npmjs.org/detectincognitojs/-/detectincognitojs-1.6.2.tgz", + "integrity": "sha512-q4JXwcc7CZXDfSfWHBapnB1EHZgtW6OMcCWOXwN9/2gPJPRzDZL9wMrtpojWe1eUWDFP6bfuT4GIWJ07Waaq4w==", "license": "MIT" }, "node_modules/didyoumean": { @@ -28264,9 +28263,9 @@ "license": "ISC", "dependencies": { "@corbado/webauthn-json": "^2.2.0", - "@fingerprintjs/fingerprintjs": "^3.4.2", + "@fingerprintjs/fingerprintjs": "^5.0.1", "axios": "^1.8.4", - "detectincognitojs": "^1.3.7", + "detectincognitojs": "^1.6.2", "loglevel": "^1.8.1", "rxjs": "^7.8.1", "ts-results": "^3.3.0" diff --git a/packages/types/src/authentication.ts b/packages/types/src/authentication.ts index 6abcf2df..ab5aa9cf 100644 --- a/packages/types/src/authentication.ts +++ b/packages/types/src/authentication.ts @@ -88,9 +88,14 @@ export interface PassKeyList { export interface ClientCapabilities { conditionalCreate: boolean; conditionalMediation: boolean; + conditionalGet: boolean; hybridTransport: boolean; passkeyPlatformAuthenticator: boolean; userVerifyingPlatformAuthenticator: boolean; + relatedOrigins: boolean; + signalAllAcceptedCredentials: boolean; + signalCurrentUserDetails: boolean; + signalUnknownCredential: boolean; } export const PasskeyCeremonyType = { diff --git a/packages/web-core/openapi/spec_v2.yaml b/packages/web-core/openapi/spec_v2.yaml index e1b59224..d65191d6 100644 --- a/packages/web-core/openapi/spec_v2.yaml +++ b/packages/web-core/openapi/spec_v2.yaml @@ -33,6 +33,8 @@ tags: description: All API calls that are related to a connect process - name: OIDC description: All API calls that are related to OpenID Connect + - name: WellKnown + description: All API calls that are related to WellKnown assets paths: /v2/process-config: @@ -952,6 +954,55 @@ paths: "401": description: Unauthorized - Invalid or missing token + /.well-known/assetlinks.json: + get: + description: Provides asset links for android devices + operationId: AssetLinks + tags: + - WellKnown + responses: + '200': + description: Provides a list of assets links + content: + application/json: + schema: + $ref: '#/components/schemas/assetLinksRsp' + default: + $ref: '#/components/responses/error' + + /.well-known/apple-app-site-association: + get: + description: Provides apple app site association + operationId: AppleAppSiteAssociation + tags: + - WellKnown + responses: + '200': + description: Provides a list of site association + content: + application/json: + schema: + $ref: '#/components/schemas/appleAppSiteAssociationRsp' + default: + $ref: '#/components/responses/error' + + /.well-known/jwks: + get: + description: Retrieves well-known JWKS for Project ID + operationId: WellKnownJWKSList + tags: + - WellKnown + responses: + '200': + description: JWKS successfully retrieved + content: + application/json: + schema: + $ref: '#/components/schemas/wellKnownJWKSListRsp' + default: + $ref: '#/components/responses/error' + security: [ ] + components: ################################################################### @@ -1083,7 +1134,7 @@ components: type: string appendNotAllowedReason: type: string - enum: ["passkey_already_exists", "passkeys_not_supported"] + enum: [ "passkey_already_exists", "passkeys_not_supported" ] attestationOptions: type: string example: '{"publicKey":{"challenge":"2m6...0w9/MgW...KE=","rp":{"name":"demo","id":"localhost"},"user":{"name":"example@mail.com","id":"dXN...zk5"},"pubKeyCredParams":[{"type":"public-key","alg":-7},{"type":"public-key","alg":-35},{"type":"public-key","alg":-36},{"type":"public-key","alg":-257},{"type":"public-key","alg":-258},{"type":"public-key","alg":-259},{"type":"public-key","alg":-37},{"type":"public-key","alg":-38},{"type":"public-key","alg":-39},{"type":"public-key","alg":-8}],"authenticatorSelection":{"authenticatorAttachment":"platform","requireResidentKey":false,"userVerification":"required"},"timeout":60000,"attestation":"none"}}' @@ -1366,7 +1417,7 @@ components: type: string source: type: string - enum: ["one-tap", "text-field", "error-soft", "error-hard"] + enum: [ "one-tap", "text-field", "error-soft", "error-hard" ] loadedMs: type: integer format: int64 @@ -1412,7 +1463,6 @@ components: required: - session - signedPasskeyData - - passkeyOperation properties: passkeyOperation: $ref: "#/components/schemas/passkeyOperation" @@ -1437,6 +1487,8 @@ components: type: string invitationToken: type: string + situation: + type: string connectAppendInitRsp: type: object @@ -1478,6 +1530,8 @@ components: loadedMs: type: integer format: int64 + situation: + type: string connectAppendStartRsp: type: object @@ -1487,6 +1541,7 @@ components: - isRestrictedBrowser - autoAppend - conditionalAppend + - expiresMs properties: attestationOptions: type: string @@ -1502,6 +1557,13 @@ components: type: boolean conditionalAppend: type: boolean + expiresMs: + type: integer + format: int64 + customData: + type: object + additionalProperties: + type: string connectAppendFinishReq: type: object @@ -1513,6 +1575,10 @@ components: type: string completionType: $ref: "#/components/schemas/appendCompletionType" + customData: + type: object + additionalProperties: + type: string connectAppendFinishRsp: type: object @@ -1580,6 +1646,9 @@ components: properties: connectToken: type: string + mode: + type: string + enum: [ "default", "post-delete", "post-append" ] connectManageListRsp: type: object @@ -1587,6 +1656,7 @@ components: - passkeys - rpID - userID + - signalAllAcceptedCredentials properties: passkeys: type: array @@ -1596,6 +1666,8 @@ components: type: string userID: type: string + signalAllAcceptedCredentials: + type: boolean connectManageDeleteRsp: type: object @@ -1674,7 +1746,7 @@ components: $ref: "common.yml#/components/schemas/created" status: type: string - enum: ["pending", "active"] + enum: [ "pending", "active" ] description: "Status" aaguidDetails: $ref: "#/components/schemas/aaguidDetails" @@ -1801,7 +1873,7 @@ components: type: boolean sameSite: type: string - enum: ["lax", "strict", "none"] + enum: [ "lax", "strict", "none" ] path: type: string lifetimeSeconds: @@ -1822,7 +1894,7 @@ components: type: boolean sameSite: type: string - enum: ["lax", "strict", "none"] + enum: [ "lax", "strict", "none" ] path: type: string lifetimeSeconds: @@ -1905,7 +1977,7 @@ components: loginIdentifierType: type: string - enum: [email, phone, username] + enum: [ email, phone, username ] passkeyEventType: type: string @@ -1951,15 +2023,15 @@ components: authType: type: string - enum: [signup, login] + enum: [ signup, login ] verificationMethod: type: string - enum: [email-link, email-otp, phone-otp] + enum: [ email-link, email-otp, phone-otp ] passkeyIconSet: type: string - enum: [default, apple, android, windows] + enum: [ default, apple, android, windows ] generalBlockSignupInit: type: object @@ -2061,7 +2133,7 @@ components: type: string loginHint: type: string - enum: ["cda"] + enum: [ "cda" ] generalBlockPasskeyAppended: type: object @@ -2182,7 +2254,7 @@ components: format: int64 source: type: string - enum: ["ls", "url", "native"] + enum: [ "ls", "url", "native" ] nativeMeta: type: object @@ -2205,7 +2277,7 @@ components: type: string deviceOwnerAuth: type: string - enum: ["none", "code", "biometrics"] + enum: [ "none", "code", "biometrics" ] isBluetoothAvailable: type: boolean isBluetoothOn: @@ -2216,6 +2288,34 @@ components: type: boolean error: type: string + brand: + type: string + model: + type: string + locale: + type: string + screen: + $ref: "#/components/schemas/nativeMetaScreen" + sdkInitTimeMs: + type: integer + format: int64 + + nativeMetaScreen: + type: object + required: + - widthPoints + - heightPoints + - scale + properties: + widthPoints: + type: number + format: float + heightPoints: + type: number + format: float + scale: + type: number + format: float clientCapabilities: type: object @@ -2224,12 +2324,22 @@ components: type: boolean conditionalMediation: type: boolean + conditionalGet: + type: boolean hybridTransport: type: boolean passkeyPlatformAuthenticator: type: boolean userVerifyingPlatformAuthenticator: type: boolean + relatedOrigins: + type: boolean + signalAllAcceptedCredentials: + type: boolean + signalCurrentUserDetails: + type: boolean + signalUnknownCredential: + type: boolean javaScriptHighEntropy: type: object @@ -2255,14 +2365,14 @@ components: properties: operationType: type: string - enum: ["append", "verify"] + enum: [ "append", "verify" ] identifierValue: type: string identifierType: $ref: "#/components/schemas/loginIdentifierType" ceremonyType: type: string - enum: ["local", "cda", "security-key"] + enum: [ "local", "cda", "security-key" ] aaguidDetails: $ref: "#/components/schemas/aaguidDetails" @@ -2273,7 +2383,7 @@ components: properties: reason: type: string - enum: ["email-link-verified", "process-already-completed"] + enum: [ "email-link-verified", "process-already-completed" ] meRsp: type: object @@ -2350,7 +2460,7 @@ components: $ref: "common.yml#/components/schemas/socialProviderType" status: type: string - enum: ["initial", "started", "finished"] + enum: [ "initial", "started", "finished" ] oauthUrl: type: string error: @@ -2381,7 +2491,131 @@ components: appendCompletionType: type: string - enum: ["auto", "conditional", "manual", "manual-retry"] + enum: [ "auto", "conditional", "manual", "manual-retry" ] + + assetLinksRsp: + type: array + items: + $ref: '#/components/schemas/assetLink' + + assetLink: + type: object + required: + - relation + - target + properties: + relation: + type: array + items: + type: string + target: + $ref: '#/components/schemas/assetLinkTarget' + + assetLinkTarget: + type: object + required: + - namespace + properties: + namespace: + type: string + package_name: + type: string + site: + type: string + sha256_cert_fingerprints: + type: array + items: + type: string + + appleAppSiteAssociationRsp: + type: object + required: + - applinks + - webcredentials + - appclips + properties: + applinks: + type: object + required: + - details + properties: + details: + type: array + items: + type: object + required: + - appID + - paths + properties: + appID: + type: string + paths: + type: array + items: + type: string + + webcredentials: + type: object + required: + - apps + properties: + apps: + type: array + items: + type: string + + appclips: + type: object + required: + - apps + properties: + apps: + type: array + items: + type: string + wellKnownJWKSListRsp: + type: object + required: + - keys + properties: + keys: + type: array + items: + $ref: '#/components/schemas/jwk' + + # DO NOT MODIFY - see https://www.rfc-editor.org/rfc/rfc7517#section-4 + jwk: + description: JSON Web Key + type: object + required: + - alg + - kty + - use + - 'n' + - e + - kid + properties: + alg: + description: The specific cryptographic algorithm used with the key + type: string + example: 'RS256' + kty: + description: The family of cryptographic algorithms used with the key + type: string + example: 'RSA' + use: + description: How the key was meant to be used; sig represents the signature + type: string + # 'n' is a reserved key in yaml and must be escaped, otherwise code generation breaks! + 'n': + description: The modulus for the RSA public key + type: string + e: + description: The exponent for the RSA public key + type: string + kid: + description: The unique identifier for the key + type: string responses: "200": @@ -2391,6 +2625,13 @@ components: schema: $ref: "common.yml#/components/schemas/genericRsp" + error: + description: Error + content: + application/json: + schema: + $ref: 'common.yml#/components/schemas/errorRsp' + security: - - bearerAuth: [] - - projectID: [] + - bearerAuth: [ ] + - projectID: [ ] diff --git a/packages/web-core/package.json b/packages/web-core/package.json index 8f9c8cbd..d1a377be 100644 --- a/packages/web-core/package.json +++ b/packages/web-core/package.json @@ -35,9 +35,9 @@ }, "dependencies": { "@corbado/webauthn-json": "^2.2.0", - "@fingerprintjs/fingerprintjs": "^3.4.2", + "@fingerprintjs/fingerprintjs": "^5.0.1", "axios": "^1.8.4", - "detectincognitojs": "^1.3.7", + "detectincognitojs": "^1.6.2", "loglevel": "^1.8.1", "rxjs": "^7.8.1", "ts-results": "^3.3.0" diff --git a/packages/web-core/src/api/v2/api.ts b/packages/web-core/src/api/v2/api.ts index 5ec6d54c..5fe7adff 100644 --- a/packages/web-core/src/api/v2/api.ts +++ b/packages/web-core/src/api/v2/api.ts @@ -64,6 +64,126 @@ export const AppendCompletionType = { export type AppendCompletionType = typeof AppendCompletionType[keyof typeof AppendCompletionType]; +/** + * + * @export + * @interface AppleAppSiteAssociationRsp + */ +export interface AppleAppSiteAssociationRsp { + /** + * + * @type {AppleAppSiteAssociationRspApplinks} + * @memberof AppleAppSiteAssociationRsp + */ + 'applinks': AppleAppSiteAssociationRspApplinks; + /** + * + * @type {AppleAppSiteAssociationRspWebcredentials} + * @memberof AppleAppSiteAssociationRsp + */ + 'webcredentials': AppleAppSiteAssociationRspWebcredentials; + /** + * + * @type {AppleAppSiteAssociationRspWebcredentials} + * @memberof AppleAppSiteAssociationRsp + */ + 'appclips': AppleAppSiteAssociationRspWebcredentials; +} +/** + * + * @export + * @interface AppleAppSiteAssociationRspApplinks + */ +export interface AppleAppSiteAssociationRspApplinks { + /** + * + * @type {Array} + * @memberof AppleAppSiteAssociationRspApplinks + */ + 'details': Array; +} +/** + * + * @export + * @interface AppleAppSiteAssociationRspApplinksDetailsInner + */ +export interface AppleAppSiteAssociationRspApplinksDetailsInner { + /** + * + * @type {string} + * @memberof AppleAppSiteAssociationRspApplinksDetailsInner + */ + 'appID': string; + /** + * + * @type {Array} + * @memberof AppleAppSiteAssociationRspApplinksDetailsInner + */ + 'paths': Array; +} +/** + * + * @export + * @interface AppleAppSiteAssociationRspWebcredentials + */ +export interface AppleAppSiteAssociationRspWebcredentials { + /** + * + * @type {Array} + * @memberof AppleAppSiteAssociationRspWebcredentials + */ + 'apps': Array; +} +/** + * + * @export + * @interface AssetLink + */ +export interface AssetLink { + /** + * + * @type {Array} + * @memberof AssetLink + */ + 'relation': Array; + /** + * + * @type {AssetLinkTarget} + * @memberof AssetLink + */ + 'target': AssetLinkTarget; +} +/** + * + * @export + * @interface AssetLinkTarget + */ +export interface AssetLinkTarget { + /** + * + * @type {string} + * @memberof AssetLinkTarget + */ + 'namespace': string; + /** + * + * @type {string} + * @memberof AssetLinkTarget + */ + 'package_name'?: string; + /** + * + * @type {string} + * @memberof AssetLinkTarget + */ + 'site'?: string; + /** + * + * @type {Array} + * @memberof AssetLinkTarget + */ + 'sha256_cert_fingerprints'?: Array; +} /** * * @export @@ -171,6 +291,12 @@ export interface ClientCapabilities { * @memberof ClientCapabilities */ 'conditionalMediation'?: boolean; + /** + * + * @type {boolean} + * @memberof ClientCapabilities + */ + 'conditionalGet'?: boolean; /** * * @type {boolean} @@ -189,6 +315,30 @@ export interface ClientCapabilities { * @memberof ClientCapabilities */ 'userVerifyingPlatformAuthenticator'?: boolean; + /** + * + * @type {boolean} + * @memberof ClientCapabilities + */ + 'relatedOrigins'?: boolean; + /** + * + * @type {boolean} + * @memberof ClientCapabilities + */ + 'signalAllAcceptedCredentials'?: boolean; + /** + * + * @type {boolean} + * @memberof ClientCapabilities + */ + 'signalCurrentUserDetails'?: boolean; + /** + * + * @type {boolean} + * @memberof ClientCapabilities + */ + 'signalUnknownCredential'?: boolean; } /** * @@ -321,6 +471,12 @@ export interface ConnectAppendFinishReq { * @memberof ConnectAppendFinishReq */ 'completionType': AppendCompletionType; + /** + * + * @type {{ [key: string]: string; }} + * @memberof ConnectAppendFinishReq + */ + 'customData'?: { [key: string]: string; }; } @@ -361,6 +517,12 @@ export interface ConnectAppendInitReq { * @memberof ConnectAppendInitReq */ 'invitationToken'?: string; + /** + * + * @type {string} + * @memberof ConnectAppendInitReq + */ + 'situation'?: string; } /** * @@ -435,6 +597,12 @@ export interface ConnectAppendStartReq { * @memberof ConnectAppendStartReq */ 'loadedMs': number; + /** + * + * @type {string} + * @memberof ConnectAppendStartReq + */ + 'situation'?: string; } /** * @@ -472,6 +640,18 @@ export interface ConnectAppendStartRsp { * @memberof ConnectAppendStartRsp */ 'conditionalAppend': boolean; + /** + * + * @type {number} + * @memberof ConnectAppendStartRsp + */ + 'expiresMs': number; + /** + * + * @type {{ [key: string]: string; }} + * @memberof ConnectAppendStartRsp + */ + 'customData'?: { [key: string]: string; }; } export const ConnectAppendStartRspVariantEnum = { @@ -545,7 +725,7 @@ export interface ConnectLoginFinishRsp { * @type {PasskeyOperation} * @memberof ConnectLoginFinishRsp */ - 'passkeyOperation': PasskeyOperation; + 'passkeyOperation'?: PasskeyOperation; /** * * @type {string} @@ -841,7 +1021,22 @@ export interface ConnectManageListReq { * @memberof ConnectManageListReq */ 'connectToken': string; + /** + * + * @type {string} + * @memberof ConnectManageListReq + */ + 'mode'?: ConnectManageListReqModeEnum; } + +export const ConnectManageListReqModeEnum = { + Default: 'default', + PostDelete: 'post-delete', + PostAppend: 'post-append' +} as const; + +export type ConnectManageListReqModeEnum = typeof ConnectManageListReqModeEnum[keyof typeof ConnectManageListReqModeEnum]; + /** * * @export @@ -866,6 +1061,12 @@ export interface ConnectManageListRsp { * @memberof ConnectManageListRsp */ 'userID': string; + /** + * + * @type {boolean} + * @memberof ConnectManageListRsp + */ + 'signalAllAcceptedCredentials': boolean; } /** * @@ -914,6 +1115,99 @@ export const ContinueOnOtherDeviceReasonEnum = { export type ContinueOnOtherDeviceReasonEnum = typeof ContinueOnOtherDeviceReasonEnum[keyof typeof ContinueOnOtherDeviceReasonEnum]; +/** + * + * @export + * @interface ErrorRsp + */ +export interface ErrorRsp { + /** + * HTTP status code of operation + * @type {number} + * @memberof ErrorRsp + */ + 'httpStatusCode': number; + /** + * + * @type {string} + * @memberof ErrorRsp + */ + 'message': string; + /** + * + * @type {RequestData} + * @memberof ErrorRsp + */ + 'requestData': RequestData; + /** + * Runtime in seconds for this request + * @type {number} + * @memberof ErrorRsp + */ + 'runtime': number; + /** + * + * @type {object} + * @memberof ErrorRsp + */ + 'data'?: object; + /** + * + * @type {ErrorRspAllOfError} + * @memberof ErrorRsp + */ + 'error': ErrorRspAllOfError; +} +/** + * + * @export + * @interface ErrorRspAllOfError + */ +export interface ErrorRspAllOfError { + /** + * Type of error + * @type {string} + * @memberof ErrorRspAllOfError + */ + 'type': string; + /** + * Details of error + * @type {string} + * @memberof ErrorRspAllOfError + */ + 'details'?: string; + /** + * Validation errors per field + * @type {Array} + * @memberof ErrorRspAllOfError + */ + 'validation'?: Array; + /** + * Additional links to help understand the error + * @type {Array} + * @memberof ErrorRspAllOfError + */ + 'links': Array; +} +/** + * + * @export + * @interface ErrorRspAllOfErrorValidation + */ +export interface ErrorRspAllOfErrorValidation { + /** + * + * @type {string} + * @memberof ErrorRspAllOfErrorValidation + */ + 'field': string; + /** + * + * @type {string} + * @memberof ErrorRspAllOfErrorValidation + */ + 'message': string; +} /** * * @export @@ -1487,6 +1781,49 @@ export interface JavaScriptHighEntropy { */ 'mobile': boolean; } +/** + * JSON Web Key + * @export + * @interface Jwk + */ +export interface Jwk { + /** + * The specific cryptographic algorithm used with the key + * @type {string} + * @memberof Jwk + */ + 'alg': string; + /** + * The family of cryptographic algorithms used with the key + * @type {string} + * @memberof Jwk + */ + 'kty': string; + /** + * How the key was meant to be used; sig represents the signature + * @type {string} + * @memberof Jwk + */ + 'use': string; + /** + * The modulus for the RSA public key + * @type {string} + * @memberof Jwk + */ + 'n': string; + /** + * The exponent for the RSA public key + * @type {string} + * @memberof Jwk + */ + 'e': string; + /** + * The unique identifier for the key + * @type {string} + * @memberof Jwk + */ + 'kid': string; +} /** * * @export @@ -1922,6 +2259,36 @@ export interface NativeMeta { * @memberof NativeMeta */ 'error'?: string; + /** + * + * @type {string} + * @memberof NativeMeta + */ + 'brand'?: string; + /** + * + * @type {string} + * @memberof NativeMeta + */ + 'model'?: string; + /** + * + * @type {string} + * @memberof NativeMeta + */ + 'locale'?: string; + /** + * + * @type {NativeMetaScreen} + * @memberof NativeMeta + */ + 'screen'?: NativeMetaScreen; + /** + * + * @type {number} + * @memberof NativeMeta + */ + 'sdkInitTimeMs'?: number; } export const NativeMetaDeviceOwnerAuthEnum = { @@ -1932,6 +2299,31 @@ export const NativeMetaDeviceOwnerAuthEnum = { export type NativeMetaDeviceOwnerAuthEnum = typeof NativeMetaDeviceOwnerAuthEnum[keyof typeof NativeMetaDeviceOwnerAuthEnum]; +/** + * + * @export + * @interface NativeMetaScreen + */ +export interface NativeMetaScreen { + /** + * + * @type {number} + * @memberof NativeMetaScreen + */ + 'widthPoints': number; + /** + * + * @type {number} + * @memberof NativeMetaScreen + */ + 'heightPoints': number; + /** + * + * @type {number} + * @memberof NativeMetaScreen + */ + 'scale': number; +} /** * * @export @@ -2754,6 +3146,19 @@ export const VerificationMethod = { export type VerificationMethod = typeof VerificationMethod[keyof typeof VerificationMethod]; +/** + * + * @export + * @interface WellKnownJWKSListRsp + */ +export interface WellKnownJWKSListRsp { + /** + * + * @type {Array} + * @memberof WellKnownJWKSListRsp + */ + 'keys': Array; +} /** * AuthApi - axios parameter creator @@ -6545,3 +6950,224 @@ export class UsersApi extends BaseAPI { +/** + * WellKnownApi - axios parameter creator + * @export + */ +export const WellKnownApiAxiosParamCreator = function (configuration?: Configuration) { + return { + /** + * Provides apple app site association + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + appleAppSiteAssociation: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/.well-known/apple-app-site-association`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication projectID required + await setApiKeyToObject(localVarHeaderParameter, "X-Corbado-ProjectID", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Provides asset links for android devices + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + assetLinks: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/.well-known/assetlinks.json`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + // authentication bearerAuth required + // http bearer authentication required + await setBearerAuthToObject(localVarHeaderParameter, configuration) + + // authentication projectID required + await setApiKeyToObject(localVarHeaderParameter, "X-Corbado-ProjectID", configuration) + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + /** + * Retrieves well-known JWKS for Project ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + wellKnownJWKSList: async (options: AxiosRequestConfig = {}): Promise => { + const localVarPath = `/.well-known/jwks`; + // use dummy base URL string because the URL constructor only accepts absolute URLs. + const localVarUrlObj = new URL(localVarPath, DUMMY_BASE_URL); + let baseOptions; + if (configuration) { + baseOptions = configuration.baseOptions; + } + + const localVarRequestOptions = { method: 'GET', ...baseOptions, ...options}; + const localVarHeaderParameter = {} as any; + const localVarQueryParameter = {} as any; + + + + setSearchParams(localVarUrlObj, localVarQueryParameter); + let headersFromBaseOptions = baseOptions && baseOptions.headers ? baseOptions.headers : {}; + localVarRequestOptions.headers = {...localVarHeaderParameter, ...headersFromBaseOptions, ...options.headers}; + + return { + url: toPathString(localVarUrlObj), + options: localVarRequestOptions, + }; + }, + } +}; + +/** + * WellKnownApi - functional programming interface + * @export + */ +export const WellKnownApiFp = function(configuration?: Configuration) { + const localVarAxiosParamCreator = WellKnownApiAxiosParamCreator(configuration) + return { + /** + * Provides apple app site association + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async appleAppSiteAssociation(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.appleAppSiteAssociation(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Provides asset links for android devices + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async assetLinks(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise>> { + const localVarAxiosArgs = await localVarAxiosParamCreator.assetLinks(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + /** + * Retrieves well-known JWKS for Project ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + async wellKnownJWKSList(options?: AxiosRequestConfig): Promise<(axios?: AxiosInstance, basePath?: string) => AxiosPromise> { + const localVarAxiosArgs = await localVarAxiosParamCreator.wellKnownJWKSList(options); + return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration); + }, + } +}; + +/** + * WellKnownApi - factory interface + * @export + */ +export const WellKnownApiFactory = function (configuration?: Configuration, basePath?: string, axios?: AxiosInstance) { + const localVarFp = WellKnownApiFp(configuration) + return { + /** + * Provides apple app site association + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + appleAppSiteAssociation(options?: any): AxiosPromise { + return localVarFp.appleAppSiteAssociation(options).then((request) => request(axios, basePath)); + }, + /** + * Provides asset links for android devices + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + assetLinks(options?: any): AxiosPromise> { + return localVarFp.assetLinks(options).then((request) => request(axios, basePath)); + }, + /** + * Retrieves well-known JWKS for Project ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + */ + wellKnownJWKSList(options?: any): AxiosPromise { + return localVarFp.wellKnownJWKSList(options).then((request) => request(axios, basePath)); + }, + }; +}; + +/** + * WellKnownApi - object-oriented interface + * @export + * @class WellKnownApi + * @extends {BaseAPI} + */ +export class WellKnownApi extends BaseAPI { + /** + * Provides apple app site association + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WellKnownApi + */ + public appleAppSiteAssociation(options?: AxiosRequestConfig) { + return WellKnownApiFp(this.configuration).appleAppSiteAssociation(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Provides asset links for android devices + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WellKnownApi + */ + public assetLinks(options?: AxiosRequestConfig) { + return WellKnownApiFp(this.configuration).assetLinks(options).then((request) => request(this.axios, this.basePath)); + } + + /** + * Retrieves well-known JWKS for Project ID + * @param {*} [options] Override http request option. + * @throws {RequiredError} + * @memberof WellKnownApi + */ + public wellKnownJWKSList(options?: AxiosRequestConfig) { + return WellKnownApiFp(this.configuration).wellKnownJWKSList(options).then((request) => request(this.axios, this.basePath)); + } +} + + +