@okta/okta-auth-js 7.14.1 → 7.14.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +4 -0
- package/cjs/http/OktaUserAgent.js +2 -2
- package/cjs/idx/authenticator/WebauthnEnrollment.js +6 -2
- package/cjs/idx/authenticator/WebauthnEnrollment.js.map +1 -1
- package/cjs/idx/authenticator/WebauthnVerification.js.map +1 -1
- package/cjs/idx/types/idx-js.js.map +1 -1
- package/cjs/idx/webauthn.js +22 -4
- package/cjs/idx/webauthn.js.map +1 -1
- package/dist/okta-auth-js.authn.min.analyzer.html +2 -2
- package/dist/okta-auth-js.authn.min.js +1 -1
- package/dist/okta-auth-js.core.min.analyzer.html +2 -2
- package/dist/okta-auth-js.core.min.js +1 -1
- package/dist/okta-auth-js.idx.min.analyzer.html +2 -2
- package/dist/okta-auth-js.idx.min.js +1 -1
- package/dist/okta-auth-js.idx.min.js.map +1 -1
- package/dist/okta-auth-js.min.analyzer.html +2 -2
- package/dist/okta-auth-js.min.js +1 -1
- package/dist/okta-auth-js.min.js.map +1 -1
- package/dist/okta-auth-js.myaccount.min.analyzer.html +2 -2
- package/dist/okta-auth-js.myaccount.min.js +1 -1
- package/esm/browser/http/OktaUserAgent.js +2 -2
- package/esm/browser/idx/authenticator/WebauthnEnrollment.js +3 -5
- package/esm/browser/idx/authenticator/WebauthnEnrollment.js.map +1 -1
- package/esm/browser/idx/authenticator/WebauthnVerification.js.map +1 -1
- package/esm/browser/idx/types/idx-js.js.map +1 -1
- package/esm/browser/idx/webauthn.js +18 -15
- package/esm/browser/idx/webauthn.js.map +1 -1
- package/esm/browser/package.json +1 -1
- package/esm/node/http/OktaUserAgent.js +2 -2
- package/esm/node/idx/authenticator/WebauthnEnrollment.js +3 -5
- package/esm/node/idx/authenticator/WebauthnEnrollment.js.map +1 -1
- package/esm/node/idx/authenticator/WebauthnVerification.js.map +1 -1
- package/esm/node/idx/types/idx-js.js.map +1 -1
- package/esm/node/idx/webauthn.js +18 -15
- package/esm/node/idx/webauthn.js.map +1 -1
- package/esm/node/package.json +1 -1
- package/package.json +3 -3
- package/types/lib/idx/authenticator/WebauthnEnrollment.d.ts +2 -0
- package/types/lib/idx/authenticator/WebauthnVerification.d.ts +1 -0
- package/types/lib/idx/types/idx-js.d.ts +3 -0
- package/types/lib/idx/webauthn.d.ts +3 -12
- package/umd/authn.js +1 -1
- package/umd/core.js +1 -1
- package/umd/default.js +1 -1
- package/umd/default.js.map +1 -1
- package/umd/idx.js +1 -1
- package/umd/idx.js.map +1 -1
- package/umd/myaccount.js +1 -1
|
@@ -14,7 +14,7 @@ import { isBrowser } from '../features.js';
|
|
|
14
14
|
|
|
15
15
|
class OktaUserAgent {
|
|
16
16
|
constructor() {
|
|
17
|
-
this.environments = [`okta-auth-js/${"7.14.
|
|
17
|
+
this.environments = [`okta-auth-js/${"7.14.2"}`];
|
|
18
18
|
this.maybeAddNodeEnvironment();
|
|
19
19
|
}
|
|
20
20
|
addEnvironment(env) {
|
|
@@ -24,7 +24,7 @@ class OktaUserAgent {
|
|
|
24
24
|
return { 'X-Okta-User-Agent-Extended': this.environments.join(' ') };
|
|
25
25
|
}
|
|
26
26
|
getVersion() {
|
|
27
|
-
return "7.14.
|
|
27
|
+
return "7.14.2";
|
|
28
28
|
}
|
|
29
29
|
maybeAddNodeEnvironment() {
|
|
30
30
|
if (isBrowser() || !process || !process.versions) {
|
|
@@ -20,14 +20,12 @@ class WebauthnEnrollment extends Authenticator {
|
|
|
20
20
|
return !!(clientData && attestation);
|
|
21
21
|
}
|
|
22
22
|
mapCredentials(values) {
|
|
23
|
-
const { credentials, clientData, attestation } = values;
|
|
23
|
+
const { credentials, clientData, attestation, transports } = values;
|
|
24
24
|
if (!credentials && !clientData && !attestation) {
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
return credentials || ({
|
|
28
|
-
|
|
29
|
-
attestation
|
|
30
|
-
});
|
|
27
|
+
return credentials || (Object.assign({ clientData,
|
|
28
|
+
attestation }, (transports && { transports })));
|
|
31
29
|
}
|
|
32
30
|
getInputs() {
|
|
33
31
|
return [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebauthnEnrollment.js","sources":["../../../../../lib/idx/authenticator/WebauthnEnrollment.ts"],"sourcesContent":["import { Authenticator, Credentials } from './Authenticator';\n\nexport interface WebauthnEnrollValues {\n clientData?: string;\n attestation?: string;\n credentials?: Credentials;\n}\n\nexport class WebauthnEnrollment extends Authenticator<WebauthnEnrollValues> {\n canVerify(values: WebauthnEnrollValues) {\n const { credentials } = values;\n const obj = credentials || values;\n const { clientData, attestation } = obj;\n return !!(clientData && attestation);\n }\n\n mapCredentials(values: WebauthnEnrollValues): Credentials | undefined {\n const { credentials, clientData, attestation } = values;\n if (!credentials && !clientData && !attestation) {\n return;\n }\n return credentials || ({\n clientData,\n attestation
|
|
1
|
+
{"version":3,"file":"WebauthnEnrollment.js","sources":["../../../../../lib/idx/authenticator/WebauthnEnrollment.ts"],"sourcesContent":["import { Authenticator, Credentials } from './Authenticator';\n\nexport interface WebauthnEnrollValues {\n id?: string;\n clientData?: string;\n attestation?: string;\n credentials?: Credentials;\n transports?: string;\n}\n\nexport class WebauthnEnrollment extends Authenticator<WebauthnEnrollValues> {\n canVerify(values: WebauthnEnrollValues) {\n const { credentials } = values;\n const obj = credentials || values;\n const { clientData, attestation } = obj;\n return !!(clientData && attestation);\n }\n\n mapCredentials(values: WebauthnEnrollValues): Credentials | undefined {\n const { credentials, clientData, attestation, transports } = values;\n if (!credentials && !clientData && !attestation) {\n return;\n }\n return credentials || ({\n clientData,\n attestation,\n ...(transports && { transports }),\n });\n }\n\n getInputs() {\n return [\n { name: 'clientData', type: 'string', required: true, visible: false, label: 'Client Data' },\n { name: 'attestation', type: 'string', required: true, visible: false, label: 'Attestation' },\n ];\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAUM,CAAO,CAAA,CAAA,CAAA,CA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AA,CAAE,QAAQ,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,EAAE,CAAI,CAAA,CAAA,CAAA,CAAA,CAAE,OAAO,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAE,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,aAAa,CAAE,CAAA,CAAA;SAC9F,CAAC;CACH,CAAA,CAAA,CAAA,CAAA;AACF,CAAA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebauthnVerification.js","sources":["../../../../../lib/idx/authenticator/WebauthnVerification.ts"],"sourcesContent":["import { Authenticator, Credentials } from './Authenticator';\n\nexport interface WebauthnVerificationValues {\n clientData?: string;\n authenticatorData?: string;\n signatureData?: string;\n credentials?: Credentials;\n}\n\nexport class WebauthnVerification extends Authenticator<WebauthnVerificationValues> {\n canVerify(values: WebauthnVerificationValues) {\n const { credentials } = values;\n const obj = credentials || values;\n const { clientData, authenticatorData, signatureData } = obj;\n return !!(clientData && authenticatorData && signatureData);\n }\n\n mapCredentials(values: WebauthnVerificationValues): Credentials | undefined {\n const { credentials, authenticatorData, clientData, signatureData } = values;\n if (!credentials && !authenticatorData && !clientData && !signatureData) {\n return;\n }\n return credentials || ({\n authenticatorData,\n clientData,\n signatureData\n });\n }\n\n getInputs() {\n return [\n { name: 'authenticatorData', type: 'string', label: 'Authenticator Data', required: true, visible: false },\n { name: 'clientData', type: 'string', label: 'Client Data', required: true, visible: false },\n { name: 'signatureData', type: 'string', label: 'Signature Data', required: true, visible: false },\n ];\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"WebauthnVerification.js","sources":["../../../../../lib/idx/authenticator/WebauthnVerification.ts"],"sourcesContent":["import { Authenticator, Credentials } from './Authenticator';\n\nexport interface WebauthnVerificationValues {\n id?: string;\n clientData?: string;\n authenticatorData?: string;\n signatureData?: string;\n credentials?: Credentials;\n}\n\nexport class WebauthnVerification extends Authenticator<WebauthnVerificationValues> {\n canVerify(values: WebauthnVerificationValues) {\n const { credentials } = values;\n const obj = credentials || values;\n const { clientData, authenticatorData, signatureData } = obj;\n return !!(clientData && authenticatorData && signatureData);\n }\n\n mapCredentials(values: WebauthnVerificationValues): Credentials | undefined {\n const { credentials, authenticatorData, clientData, signatureData } = values;\n if (!credentials && !authenticatorData && !clientData && !signatureData) {\n return;\n }\n return credentials || ({\n authenticatorData,\n clientData,\n signatureData\n });\n }\n\n getInputs() {\n return [\n { name: 'authenticatorData', type: 'string', label: 'Authenticator Data', required: true, visible: false },\n { name: 'clientData', type: 'string', label: 'Client Data', required: true, visible: false },\n { name: 'signatureData', type: 'string', label: 'Signature Data', required: true, visible: false },\n ];\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAUM,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqB,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAyC,CAAA,CAAA;AACjF,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkC,CAAA,CAAA,CAAA;AAC1C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,MAAM,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,CAAE,CAAA,CAAA,CAAA,CAAG,MAAM,CAAC;AAC/B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,MAAM,CAAG,CAAA,CAAA,CA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AAE,QAAQ,CAAE,CAAA,CAAA,CAAA,CAAA,CAAI,EAAE,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,KAAK,CAAE,CAAA,CAAA;AAC5F,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,IAAI,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,EAAE,CAAI,CAAA,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAE,CAAgB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAE,CAAA,CAAA,CAAA,CAAA,CAAI,EAAE,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,KAAK,CAAE,CAAA,CAAA;SACnG,CAAC;CACH,CAAA,CAAA,CAAA,CAAA;AACF,CAAA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idx-js.js","sources":["../../../../../lib/idx/types/idx-js.ts"],"sourcesContent":["/* eslint-disable no-use-before-define */\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { Input } from './api';\n\n\n// TODO: remove when idx-js provides type information\n\nexport interface ChallengeData {\n challenge: string; \n userVerification: string; \n extensions?: {\n appid: string;\n };\n rpId?: string;\n}\nexport interface ActivationData {\n challenge: string;\n rp: {\n name: string;\n id?: string;\n };\n user: {\n id: string;\n name: string;\n displayName: string;\n };\n pubKeyCredParams: {\n type: string;\n alg: number;\n }[];\n attestation?: string;\n authenticatorSelection?: {\n userVerification?: string;\n authenticatorAttachment?: string;\n requireResidentKey?: boolean;\n residentKey?: string;\n };\n excludeCredentials?: {\n id: string;\n type: string;\n }[];\n}\nexport interface IdxAuthenticatorMethod {\n type: string;\n}\nexport interface IdxAuthenticator {\n displayName: string;\n id: string;\n key: string;\n methods: IdxAuthenticatorMethod[];\n type: string;\n settings?: {\n complexity?: unknown;\n age?: unknown;\n };\n contextualData?: {\n enrolledQuestion?: {\n question: string;\n questionKey: string;\n };\n qrcode?: { \n href: string; \n method: string; \n type: string; \n };\n sharedSecret?: string;\n questions?: {\n questionKey: string;\n question: string;\n }[];\n questionKeys?: string[];\n selectedChannel?: string;\n activationData?: ActivationData;\n challengeData?: ChallengeData;\n };\n credentialId?: string;\n enrollmentId?: string;\n profile?: Record<string, unknown>;\n resend?: Record<string, unknown>;\n poll?: Record<string, unknown>;\n recover?: Record<string, unknown>;\n deviceKnown?: boolean;\n nickname?: string;\n}\n\nexport interface IdxForm {\n value: IdxRemediationValue[];\n}\n\nexport interface IdxOption {\n value: string | {form: IdxForm} | Input[];\n label: string;\n relatesTo?: IdxAuthenticator;\n}\n\nexport interface IdpConfig {\n id: string;\n name: string;\n}\n\nexport interface IdxRemediationValueForm {\n form: IdxForm;\n}\n\nexport interface IdxRemediationValue {\n name: string;\n type?: string;\n required?: boolean;\n secret?: boolean;\n visible?: boolean;\n mutable?: boolean;\n value?: string | IdxRemediationValueForm;\n label?: string;\n form?: IdxForm;\n options?: IdxOption[];\n messages?: IdxMessages;\n minLength?: number;\n maxLength?: number;\n relatesTo?: {\n type?: string;\n value: IdxAuthenticator;\n };\n}\n\nexport interface IdxRemediation {\n name: string;\n label?: string;\n value?: IdxRemediationValue[];\n relatesTo?: {\n type?: string;\n value: IdxAuthenticator;\n };\n idp?: IdpConfig;\n href?: string;\n method?: string;\n type?: string;\n accepts?: string;\n produces?: string;\n refresh?: number;\n rel?: string[];\n action?: (payload?: IdxActionParams) => Promise<IdxResponse>;\n}\n\nexport interface IdxContext {\n version: string;\n stateHandle: string;\n expiresAt: string;\n intent: string;\n currentAuthenticator: {\n type: string;\n value: IdxAuthenticator;\n };\n currentAuthenticatorEnrollment: {\n type: string;\n value: IdxAuthenticator;\n };\n authenticators: {\n type: string;\n value: IdxAuthenticator[];\n };\n authenticatorEnrollments: {\n type: string;\n value: IdxAuthenticator[];\n };\n enrollmentAuthenticator: {\n type: string;\n value: IdxAuthenticator;\n };\n user?: {\n type: string;\n value: Record<string, unknown>;\n };\n uiDisplay?: IdxContextUIDisplay\n app: {\n type: string;\n value: Record<string, unknown>;\n };\n messages?: IdxMessages;\n success?: IdxRemediation;\n failure?: IdxRemediation;\n}\n\nexport interface IdxContextUIDisplay {\n type: string;\n value: {\n label?: string;\n buttonLabel?: string;\n }\n}\n\nexport interface IdxMessage {\n message: string;\n class: string;\n i18n: {\n key: string;\n params?: unknown[];\n };\n}\n\nexport interface IdxMessages {\n type: 'array';\n value: IdxMessage[];\n}\n\n// JSON response from the server\nexport interface RawIdxResponse {\n version: string;\n stateHandle: string;\n intent?: string;\n expiresAt?: string;\n remediation?: {\n type: 'array';\n value: IdxRemediation[];\n };\n messages?: IdxMessages;\n success?: boolean;\n successWithInteractionCode?: IdxRemediation;\n currentAuthenticator?: {\n type: string;\n value: IdxAuthenticator;\n };\n currentAuthenticatorEnrollment?: {\n type: string;\n value: IdxAuthenticator;\n };\n}\n\nexport function isRawIdxResponse(obj: any): obj is RawIdxResponse {\n return obj && obj.version;\n}\n\nexport interface IdxActionParams {\n [key: string]: string | boolean | number | object;\n}\n\nexport interface IdxActions {\n [key: string]: (params?: IdxActionParams) => Promise<IdxResponse>;\n}\n\nexport interface IdxToPersist {\n interactionHandle?: string;\n withCredentials?: boolean;\n}\n\nexport interface IdxActionFunction {\n (params: IdxActionParams): Promise<IdxResponse>;\n neededParams?: Array<Array<IdxRemediationValue>>;\n}\n\nexport interface IdxResponse {\n proceed: (remediationName: string, params: unknown) => Promise<IdxResponse>;\n neededToProceed: IdxRemediation[];\n rawIdxState: RawIdxResponse;\n interactionCode?: string;\n actions: IdxActions;\n toPersist: IdxToPersist;\n context?: IdxContext;\n requestDidSucceed?: boolean;\n stepUp?: boolean;\n}\n\nexport function isIdxResponse(obj: any): obj is IdxResponse {\n return obj && isRawIdxResponse(obj.rawIdxState);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"idx-js.js","sources":["../../../../../lib/idx/types/idx-js.ts"],"sourcesContent":["/* eslint-disable no-use-before-define */\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { Input } from './api';\n\n\n// TODO: remove when idx-js provides type information\n\nexport interface ChallengeData {\n challenge: string; \n userVerification: string; \n extensions?: {\n appid: string;\n };\n rpId?: string;\n hints?: string[];\n}\nexport interface ActivationData {\n challenge: string;\n rp: {\n name: string;\n id?: string;\n };\n user: {\n id: string;\n name: string;\n displayName: string;\n };\n pubKeyCredParams: {\n type: string;\n alg: number;\n }[];\n attestation?: string;\n authenticatorSelection?: {\n userVerification?: string;\n authenticatorAttachment?: string;\n requireResidentKey?: boolean;\n residentKey?: string;\n };\n excludeCredentials?: {\n id: string;\n type: string;\n }[];\n hints?: string[];\n}\nexport interface IdxAuthenticatorMethod {\n type: string;\n}\nexport interface IdxAuthenticator {\n displayName: string;\n id: string;\n key: string;\n methods: IdxAuthenticatorMethod[];\n type: string;\n settings?: {\n complexity?: unknown;\n age?: unknown;\n };\n contextualData?: {\n enrolledQuestion?: {\n question: string;\n questionKey: string;\n };\n qrcode?: { \n href: string; \n method: string; \n type: string; \n };\n sharedSecret?: string;\n questions?: {\n questionKey: string;\n question: string;\n }[];\n questionKeys?: string[];\n selectedChannel?: string;\n activationData?: ActivationData;\n challengeData?: ChallengeData;\n };\n credentialId?: string;\n transports?: string[];\n enrollmentId?: string;\n profile?: Record<string, unknown>;\n resend?: Record<string, unknown>;\n poll?: Record<string, unknown>;\n recover?: Record<string, unknown>;\n deviceKnown?: boolean;\n nickname?: string;\n}\n\nexport interface IdxForm {\n value: IdxRemediationValue[];\n}\n\nexport interface IdxOption {\n value: string | {form: IdxForm} | Input[];\n label: string;\n relatesTo?: IdxAuthenticator;\n}\n\nexport interface IdpConfig {\n id: string;\n name: string;\n}\n\nexport interface IdxRemediationValueForm {\n form: IdxForm;\n}\n\nexport interface IdxRemediationValue {\n name: string;\n type?: string;\n required?: boolean;\n secret?: boolean;\n visible?: boolean;\n mutable?: boolean;\n value?: string | IdxRemediationValueForm;\n label?: string;\n form?: IdxForm;\n options?: IdxOption[];\n messages?: IdxMessages;\n minLength?: number;\n maxLength?: number;\n relatesTo?: {\n type?: string;\n value: IdxAuthenticator;\n };\n}\n\nexport interface IdxRemediation {\n name: string;\n label?: string;\n value?: IdxRemediationValue[];\n relatesTo?: {\n type?: string;\n value: IdxAuthenticator;\n };\n idp?: IdpConfig;\n href?: string;\n method?: string;\n type?: string;\n accepts?: string;\n produces?: string;\n refresh?: number;\n rel?: string[];\n action?: (payload?: IdxActionParams) => Promise<IdxResponse>;\n}\n\nexport interface IdxContext {\n version: string;\n stateHandle: string;\n expiresAt: string;\n intent: string;\n currentAuthenticator: {\n type: string;\n value: IdxAuthenticator;\n };\n currentAuthenticatorEnrollment: {\n type: string;\n value: IdxAuthenticator;\n };\n authenticators: {\n type: string;\n value: IdxAuthenticator[];\n };\n authenticatorEnrollments: {\n type: string;\n value: IdxAuthenticator[];\n };\n enrollmentAuthenticator: {\n type: string;\n value: IdxAuthenticator;\n };\n user?: {\n type: string;\n value: Record<string, unknown>;\n };\n uiDisplay?: IdxContextUIDisplay\n app: {\n type: string;\n value: Record<string, unknown>;\n };\n messages?: IdxMessages;\n success?: IdxRemediation;\n failure?: IdxRemediation;\n}\n\nexport interface IdxContextUIDisplay {\n type: string;\n value: {\n label?: string;\n buttonLabel?: string;\n }\n}\n\nexport interface IdxMessage {\n message: string;\n class: string;\n i18n: {\n key: string;\n params?: unknown[];\n };\n}\n\nexport interface IdxMessages {\n type: 'array';\n value: IdxMessage[];\n}\n\n// JSON response from the server\nexport interface RawIdxResponse {\n version: string;\n stateHandle: string;\n intent?: string;\n expiresAt?: string;\n remediation?: {\n type: 'array';\n value: IdxRemediation[];\n };\n messages?: IdxMessages;\n success?: boolean;\n successWithInteractionCode?: IdxRemediation;\n currentAuthenticator?: {\n type: string;\n value: IdxAuthenticator;\n };\n currentAuthenticatorEnrollment?: {\n type: string;\n value: IdxAuthenticator;\n };\n}\n\nexport function isRawIdxResponse(obj: any): obj is RawIdxResponse {\n return obj && obj.version;\n}\n\nexport interface IdxActionParams {\n [key: string]: string | boolean | number | object;\n}\n\nexport interface IdxActions {\n [key: string]: (params?: IdxActionParams) => Promise<IdxResponse>;\n}\n\nexport interface IdxToPersist {\n interactionHandle?: string;\n withCredentials?: boolean;\n}\n\nexport interface IdxActionFunction {\n (params: IdxActionParams): Promise<IdxResponse>;\n neededParams?: Array<Array<IdxRemediationValue>>;\n}\n\nexport interface IdxResponse {\n proceed: (remediationName: string, params: unknown) => Promise<IdxResponse>;\n neededToProceed: IdxRemediation[];\n rawIdxState: RawIdxResponse;\n interactionCode?: string;\n actions: IdxActions;\n toPersist: IdxToPersist;\n context?: IdxContext;\n requestDidSucceed?: boolean;\n stepUp?: boolean;\n}\n\nexport function isIdxResponse(obj: any): obj is IdxResponse {\n return obj && isRawIdxResponse(obj.rawIdxState);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAiPM,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgB,CAAC,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA;AACvC,CAAA,CAAA,CAAA,CAAA,OAAO,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAG,CAAA,CAAA,CAAC,OAAO,CAAC;AAC5B,CAAA;;"}
|
|
@@ -15,35 +15,33 @@ import { base64UrlToBuffer, bufferToBase64Url } from '../crypto/base64.js';
|
|
|
15
15
|
const getEnrolledCredentials = (authenticatorEnrollments = []) => {
|
|
16
16
|
const credentials = [];
|
|
17
17
|
authenticatorEnrollments.forEach((enrollement) => {
|
|
18
|
+
var _a, _b;
|
|
18
19
|
if (enrollement.key === 'webauthn') {
|
|
19
|
-
|
|
20
|
+
const credential = {
|
|
20
21
|
type: 'public-key',
|
|
21
22
|
id: base64UrlToBuffer(enrollement.credentialId),
|
|
22
|
-
}
|
|
23
|
+
};
|
|
24
|
+
const transports = (_a = enrollement.transports) !== null && _a !== void 0 ? _a : (_b = enrollement.profile) === null || _b === void 0 ? void 0 : _b.transports;
|
|
25
|
+
if (Array.isArray(transports)) {
|
|
26
|
+
credential.transports = transports;
|
|
27
|
+
}
|
|
28
|
+
credentials.push(credential);
|
|
23
29
|
}
|
|
24
30
|
});
|
|
25
31
|
return credentials;
|
|
26
32
|
};
|
|
27
33
|
const buildCredentialCreationOptions = (activationData, authenticatorEnrollments) => {
|
|
28
34
|
return {
|
|
29
|
-
publicKey: {
|
|
30
|
-
rp: activationData.rp,
|
|
31
|
-
user: {
|
|
35
|
+
publicKey: Object.assign({ rp: activationData.rp, user: {
|
|
32
36
|
id: base64UrlToBuffer(activationData.user.id),
|
|
33
37
|
name: activationData.user.name,
|
|
34
38
|
displayName: activationData.user.displayName
|
|
35
|
-
},
|
|
36
|
-
challenge: base64UrlToBuffer(activationData.challenge),
|
|
37
|
-
pubKeyCredParams: activationData.pubKeyCredParams,
|
|
38
|
-
attestation: activationData.attestation,
|
|
39
|
-
authenticatorSelection: activationData.authenticatorSelection,
|
|
40
|
-
excludeCredentials: getEnrolledCredentials(authenticatorEnrollments),
|
|
41
|
-
}
|
|
39
|
+
}, challenge: base64UrlToBuffer(activationData.challenge), pubKeyCredParams: activationData.pubKeyCredParams, attestation: activationData.attestation, authenticatorSelection: activationData.authenticatorSelection, excludeCredentials: getEnrolledCredentials(authenticatorEnrollments) }, (activationData.hints && { hints: activationData.hints }))
|
|
42
40
|
};
|
|
43
41
|
};
|
|
44
42
|
const buildCredentialRequestOptions = (challengeData, authenticatorEnrollments) => {
|
|
45
43
|
return {
|
|
46
|
-
publicKey: Object.assign({ challenge: base64UrlToBuffer(challengeData.challenge), userVerification: challengeData.userVerification, allowCredentials: getEnrolledCredentials(authenticatorEnrollments) }, (challengeData.rpId && { rpId: challengeData.rpId }))
|
|
44
|
+
publicKey: Object.assign(Object.assign({ challenge: base64UrlToBuffer(challengeData.challenge), userVerification: challengeData.userVerification, allowCredentials: getEnrolledCredentials(authenticatorEnrollments) }, (challengeData.rpId && { rpId: challengeData.rpId })), (challengeData.hints && { hints: challengeData.hints }))
|
|
47
45
|
};
|
|
48
46
|
};
|
|
49
47
|
const getAttestation = (credential) => {
|
|
@@ -51,11 +49,16 @@ const getAttestation = (credential) => {
|
|
|
51
49
|
const id = credential.id;
|
|
52
50
|
const clientData = bufferToBase64Url(response.clientDataJSON);
|
|
53
51
|
const attestation = bufferToBase64Url(response.attestationObject);
|
|
54
|
-
|
|
52
|
+
const getTransportsFn = response.getTransports;
|
|
53
|
+
const result = {
|
|
55
54
|
id,
|
|
56
55
|
clientData,
|
|
57
|
-
attestation
|
|
56
|
+
attestation,
|
|
58
57
|
};
|
|
58
|
+
if (typeof getTransportsFn === 'function') {
|
|
59
|
+
result.transports = JSON.stringify(getTransportsFn.call(response));
|
|
60
|
+
}
|
|
61
|
+
return result;
|
|
59
62
|
};
|
|
60
63
|
const getAssertion = (credential) => {
|
|
61
64
|
const response = credential.response;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webauthn.js","sources":["../../../../lib/idx/webauthn.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { base64UrlToBuffer, bufferToBase64Url } from '../crypto/base64';\nimport {\n ActivationData,\n ChallengeData,\n IdxAuthenticator,\n} from './types';\n\n\n// Get known credentials from list of enrolled authenticators\nconst getEnrolledCredentials = (authenticatorEnrollments: IdxAuthenticator[] = []) => {\n const credentials: PublicKeyCredentialDescriptor[] = [];\n authenticatorEnrollments.forEach((enrollement) => {\n if (enrollement.key === 'webauthn') {\n credentials.push({\n type: 'public-key',\n id: base64UrlToBuffer(enrollement.credentialId),\n });\n }\n });\n return credentials;\n};\n\n// Build options for navigator.credentials.create\n// https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/create\nexport const buildCredentialCreationOptions = (\n activationData: ActivationData, authenticatorEnrollments: IdxAuthenticator[]\n) => {\n return {\n publicKey: {\n rp: activationData.rp,\n user: {\n id: base64UrlToBuffer(activationData.user.id),\n name: activationData.user.name,\n displayName: activationData.user.displayName\n },\n challenge: base64UrlToBuffer(activationData.challenge),\n pubKeyCredParams: activationData.pubKeyCredParams,\n attestation: activationData.attestation,\n authenticatorSelection: activationData.authenticatorSelection,\n excludeCredentials: getEnrolledCredentials(authenticatorEnrollments),\n }\n } as CredentialCreationOptions;\n};\n\n\n// Build options for navigator.credentials.get\n// https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/get\nexport const buildCredentialRequestOptions = (\n challengeData: ChallengeData, authenticatorEnrollments: IdxAuthenticator[]\n) => {\n return {\n publicKey: {\n challenge: base64UrlToBuffer(challengeData.challenge),\n userVerification: challengeData.userVerification,\n allowCredentials: getEnrolledCredentials(authenticatorEnrollments),\n ...(challengeData.rpId && { rpId: challengeData.rpId }),\n }\n } as CredentialRequestOptions;\n};\n\n// Build attestation for webauthn enroll\n// https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAttestationResponse\nexport const getAttestation = (credential: PublicKeyCredential) => {\n const response = credential.response as AuthenticatorAttestationResponse;\n const id = credential.id;\n const clientData = bufferToBase64Url(response.clientDataJSON);\n const attestation = bufferToBase64Url(response.attestationObject);\n return {\n id,\n clientData,\n attestation\n };\n};\n\n// Build assertion for webauthn verification\n// https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAssertionResponse\nexport const getAssertion = (credential: PublicKeyCredential) => {\n const response = credential.response as AuthenticatorAssertionResponse;\n const id = credential.id;\n const clientData = bufferToBase64Url(response.clientDataJSON);\n const authenticatorData = bufferToBase64Url(response.authenticatorData);\n const signatureData = bufferToBase64Url(response.signature);\n return {\n id,\n clientData,\n authenticatorData,\n signatureData\n };\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAqBA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,sBAAsB,CAAG,CAAA,CAAA,CAAC,CAA+C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAE,CAAI,CAAA,CAAA,CAAA,CAAA,CAAA;IACnF,CAAM,CAAA,CAAA,CAAA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AAA,CAAA,CAAA,CAAM,iBAAiB,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,CAAC,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,CAAC;CACxE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,aAAa,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,CAAC,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,CAAC;IAC5D,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;QACL,CAAE,CAAA,CAAA;QACF,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;QACV,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;QACjB,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;KACd,CAAC;AACJ,CAAA,CAAA;;"}
|
|
1
|
+
{"version":3,"file":"webauthn.js","sources":["../../../../lib/idx/webauthn.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { base64UrlToBuffer, bufferToBase64Url } from '../crypto/base64';\nimport {\n ActivationData,\n ChallengeData,\n IdxAuthenticator,\n WebauthnEnrollValues,\n WebauthnVerificationValues,\n} from './types';\n\n\n// Get known credentials from list of enrolled authenticators\nconst getEnrolledCredentials = (authenticatorEnrollments: IdxAuthenticator[] = []) => {\n const credentials: PublicKeyCredentialDescriptor[] = [];\n authenticatorEnrollments.forEach((enrollement) => {\n if (enrollement.key === 'webauthn') {\n const credential: PublicKeyCredentialDescriptor = {\n type: 'public-key',\n id: base64UrlToBuffer(enrollement.credentialId),\n };\n // transports may be at top-level or nested under profile\n const transports = enrollement.transports\n ?? (enrollement.profile as Record<string, unknown> | undefined)?.transports;\n if (Array.isArray(transports)) {\n credential.transports = transports as AuthenticatorTransport[];\n }\n credentials.push(credential);\n }\n });\n return credentials;\n};\n\n// Build options for navigator.credentials.create\n// https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/create\nexport const buildCredentialCreationOptions = (\n activationData: ActivationData, authenticatorEnrollments: IdxAuthenticator[]\n) => {\n return {\n publicKey: {\n rp: activationData.rp,\n user: {\n id: base64UrlToBuffer(activationData.user.id),\n name: activationData.user.name,\n displayName: activationData.user.displayName\n },\n challenge: base64UrlToBuffer(activationData.challenge),\n pubKeyCredParams: activationData.pubKeyCredParams,\n attestation: activationData.attestation,\n authenticatorSelection: activationData.authenticatorSelection,\n excludeCredentials: getEnrolledCredentials(authenticatorEnrollments),\n ...(activationData.hints && { hints: activationData.hints }),\n }\n } as CredentialCreationOptions;\n};\n\n\n// Build options for navigator.credentials.get\n// https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/get\nexport const buildCredentialRequestOptions = (\n challengeData: ChallengeData, authenticatorEnrollments: IdxAuthenticator[]\n) => {\n return {\n publicKey: {\n challenge: base64UrlToBuffer(challengeData.challenge),\n userVerification: challengeData.userVerification,\n allowCredentials: getEnrolledCredentials(authenticatorEnrollments),\n ...(challengeData.rpId && { rpId: challengeData.rpId }),\n ...(challengeData.hints && { hints: challengeData.hints }),\n }\n } as CredentialRequestOptions;\n};\n\n// Build attestation for webauthn enroll\n// https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAttestationResponse\nexport const getAttestation = (credential: PublicKeyCredential): WebauthnEnrollValues => {\n const response = credential.response as AuthenticatorAttestationResponse;\n const id = credential.id;\n const clientData = bufferToBase64Url(response.clientDataJSON);\n const attestation = bufferToBase64Url(response.attestationObject);\n // getTransports() is a newer WebAuthn API not yet in all TS type definitions\n const getTransportsFn = (response as any).getTransports;\n const result: WebauthnEnrollValues = {\n id,\n clientData,\n attestation,\n };\n if (typeof getTransportsFn === 'function') {\n result.transports = JSON.stringify(getTransportsFn.call(response));\n }\n return result;\n};\n\n// Build assertion for webauthn verification\n// https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAssertionResponse\nexport const getAssertion = (credential: PublicKeyCredential): WebauthnVerificationValues => {\n const response = credential.response as AuthenticatorAssertionResponse;\n const id = credential.id;\n const clientData = bufferToBase64Url(response.clientDataJSON);\n const authenticatorData = bufferToBase64Url(response.authenticatorData);\n const signatureData = bufferToBase64Url(response.signature);\n return {\n id,\n clientData,\n authenticatorData,\n signatureData\n };\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAuBA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,sBAAsB,CAAG,CAAA,CAAA,CAAC,CAA+C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,EAAE,CAAI,CAAA,CAAA,CAAA,CAAA,CA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,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,CAAC,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,CAAC;IAC5D,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;QACL,CAAE,CAAA,CAAA;QACF,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;QACV,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;QACjB,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;KACd,CAAC;AACJ,CAAA,CAAA;;"}
|
package/esm/browser/package.json
CHANGED
|
@@ -14,7 +14,7 @@ import { isBrowser } from '../features.js';
|
|
|
14
14
|
|
|
15
15
|
class OktaUserAgent {
|
|
16
16
|
constructor() {
|
|
17
|
-
this.environments = [`okta-auth-js/${"7.14.
|
|
17
|
+
this.environments = [`okta-auth-js/${"7.14.2"}`];
|
|
18
18
|
this.maybeAddNodeEnvironment();
|
|
19
19
|
}
|
|
20
20
|
addEnvironment(env) {
|
|
@@ -24,7 +24,7 @@ class OktaUserAgent {
|
|
|
24
24
|
return { 'X-Okta-User-Agent-Extended': this.environments.join(' ') };
|
|
25
25
|
}
|
|
26
26
|
getVersion() {
|
|
27
|
-
return "7.14.
|
|
27
|
+
return "7.14.2";
|
|
28
28
|
}
|
|
29
29
|
maybeAddNodeEnvironment() {
|
|
30
30
|
if (isBrowser() || !process || !process.versions) {
|
|
@@ -20,14 +20,12 @@ class WebauthnEnrollment extends Authenticator {
|
|
|
20
20
|
return !!(clientData && attestation);
|
|
21
21
|
}
|
|
22
22
|
mapCredentials(values) {
|
|
23
|
-
const { credentials, clientData, attestation } = values;
|
|
23
|
+
const { credentials, clientData, attestation, transports } = values;
|
|
24
24
|
if (!credentials && !clientData && !attestation) {
|
|
25
25
|
return;
|
|
26
26
|
}
|
|
27
|
-
return credentials || ({
|
|
28
|
-
|
|
29
|
-
attestation
|
|
30
|
-
});
|
|
27
|
+
return credentials || (Object.assign({ clientData,
|
|
28
|
+
attestation }, (transports && { transports })));
|
|
31
29
|
}
|
|
32
30
|
getInputs() {
|
|
33
31
|
return [
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebauthnEnrollment.js","sources":["../../../../../lib/idx/authenticator/WebauthnEnrollment.ts"],"sourcesContent":["import { Authenticator, Credentials } from './Authenticator';\n\nexport interface WebauthnEnrollValues {\n clientData?: string;\n attestation?: string;\n credentials?: Credentials;\n}\n\nexport class WebauthnEnrollment extends Authenticator<WebauthnEnrollValues> {\n canVerify(values: WebauthnEnrollValues) {\n const { credentials } = values;\n const obj = credentials || values;\n const { clientData, attestation } = obj;\n return !!(clientData && attestation);\n }\n\n mapCredentials(values: WebauthnEnrollValues): Credentials | undefined {\n const { credentials, clientData, attestation } = values;\n if (!credentials && !clientData && !attestation) {\n return;\n }\n return credentials || ({\n clientData,\n attestation
|
|
1
|
+
{"version":3,"file":"WebauthnEnrollment.js","sources":["../../../../../lib/idx/authenticator/WebauthnEnrollment.ts"],"sourcesContent":["import { Authenticator, Credentials } from './Authenticator';\n\nexport interface WebauthnEnrollValues {\n id?: string;\n clientData?: string;\n attestation?: string;\n credentials?: Credentials;\n transports?: string;\n}\n\nexport class WebauthnEnrollment extends Authenticator<WebauthnEnrollValues> {\n canVerify(values: WebauthnEnrollValues) {\n const { credentials } = values;\n const obj = credentials || values;\n const { clientData, attestation } = obj;\n return !!(clientData && attestation);\n }\n\n mapCredentials(values: WebauthnEnrollValues): Credentials | undefined {\n const { credentials, clientData, attestation, transports } = values;\n if (!credentials && !clientData && !attestation) {\n return;\n }\n return credentials || ({\n clientData,\n attestation,\n ...(transports && { transports }),\n });\n }\n\n getInputs() {\n return [\n { name: 'clientData', type: 'string', required: true, visible: false, label: 'Client Data' },\n { name: 'attestation', type: 'string', required: true, visible: false, label: 'Attestation' },\n ];\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAUM,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmB,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAmC,CAAA,CAAA;AACzE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAA4B,CAAA,CAAA,CAAA;AACpC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,MAAM,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAW,CAAE,CAAA,CAAA,CAAA,CAAG,MAAM,CAAC;AAC/B,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,MAAM,CAAG,CAAA,CAAA,CAAA,CAAA,CAAG,CAAW,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,MAAM,CAAC;AAClC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,EAAE,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,WAAW,CAAE,CAAA,CAAA,CAAA,CAAG,GAAG,CAAC;AAC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;AAC5F,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,IAAI,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAa,EAAE,CAAI,CAAA,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAQ,EAAE,CAAI,CAAA,CAAA,CAAA,CAAA,CAAE,OAAO,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAE,CAAK,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,aAAa,CAAE,CAAA,CAAA;SAC9F,CAAC;CACH,CAAA,CAAA,CAAA,CAAA;AACF,CAAA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"WebauthnVerification.js","sources":["../../../../../lib/idx/authenticator/WebauthnVerification.ts"],"sourcesContent":["import { Authenticator, Credentials } from './Authenticator';\n\nexport interface WebauthnVerificationValues {\n clientData?: string;\n authenticatorData?: string;\n signatureData?: string;\n credentials?: Credentials;\n}\n\nexport class WebauthnVerification extends Authenticator<WebauthnVerificationValues> {\n canVerify(values: WebauthnVerificationValues) {\n const { credentials } = values;\n const obj = credentials || values;\n const { clientData, authenticatorData, signatureData } = obj;\n return !!(clientData && authenticatorData && signatureData);\n }\n\n mapCredentials(values: WebauthnVerificationValues): Credentials | undefined {\n const { credentials, authenticatorData, clientData, signatureData } = values;\n if (!credentials && !authenticatorData && !clientData && !signatureData) {\n return;\n }\n return credentials || ({\n authenticatorData,\n clientData,\n signatureData\n });\n }\n\n getInputs() {\n return [\n { name: 'authenticatorData', type: 'string', label: 'Authenticator Data', required: true, visible: false },\n { name: 'clientData', type: 'string', label: 'Client Data', required: true, visible: false },\n { name: 'signatureData', type: 'string', label: 'Signature Data', required: true, visible: false },\n ];\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"WebauthnVerification.js","sources":["../../../../../lib/idx/authenticator/WebauthnVerification.ts"],"sourcesContent":["import { Authenticator, Credentials } from './Authenticator';\n\nexport interface WebauthnVerificationValues {\n id?: string;\n clientData?: string;\n authenticatorData?: string;\n signatureData?: string;\n credentials?: Credentials;\n}\n\nexport class WebauthnVerification extends Authenticator<WebauthnVerificationValues> {\n canVerify(values: WebauthnVerificationValues) {\n const { credentials } = values;\n const obj = credentials || values;\n const { clientData, authenticatorData, signatureData } = obj;\n return !!(clientData && authenticatorData && signatureData);\n }\n\n mapCredentials(values: WebauthnVerificationValues): Credentials | undefined {\n const { credentials, authenticatorData, clientData, signatureData } = values;\n if (!credentials && !authenticatorData && !clientData && !signatureData) {\n return;\n }\n return credentials || ({\n authenticatorData,\n clientData,\n signatureData\n });\n }\n\n getInputs() {\n return [\n { name: 'authenticatorData', type: 'string', label: 'Authenticator Data', required: true, visible: false },\n { name: 'clientData', type: 'string', label: 'Client Data', required: true, visible: false },\n { name: 'signatureData', type: 'string', label: 'Signature Data', required: true, visible: false },\n ];\n }\n}\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAUM,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAqB,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAyC,CAAA,CAAA;AACjF,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAS,CAAC,CAAA,CAAA,CAAA,CAAA,CAAA,CAAkC,CAAA,CAAA,CAAA;AAC1C,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA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A,CAAA,CAAA,CAAA,CAAA,CAAA,CAAY,EAAE,CAAI,CAAA,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAE,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAE,CAAA,CAAA,CAAA,CAAA,CAAI,EAAE,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,KAAK,CAAE,CAAA,CAAA;AAC5F,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,IAAI,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAe,EAAE,CAAI,CAAA,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAK,EAAE,CAAgB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,QAAQ,CAAE,CAAA,CAAA,CAAA,CAAA,CAAI,EAAE,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAE,KAAK,CAAE,CAAA,CAAA;SACnG,CAAC;CACH,CAAA,CAAA,CAAA,CAAA;AACF,CAAA;;"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"idx-js.js","sources":["../../../../../lib/idx/types/idx-js.ts"],"sourcesContent":["/* eslint-disable no-use-before-define */\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { Input } from './api';\n\n\n// TODO: remove when idx-js provides type information\n\nexport interface ChallengeData {\n challenge: string; \n userVerification: string; \n extensions?: {\n appid: string;\n };\n rpId?: string;\n}\nexport interface ActivationData {\n challenge: string;\n rp: {\n name: string;\n id?: string;\n };\n user: {\n id: string;\n name: string;\n displayName: string;\n };\n pubKeyCredParams: {\n type: string;\n alg: number;\n }[];\n attestation?: string;\n authenticatorSelection?: {\n userVerification?: string;\n authenticatorAttachment?: string;\n requireResidentKey?: boolean;\n residentKey?: string;\n };\n excludeCredentials?: {\n id: string;\n type: string;\n }[];\n}\nexport interface IdxAuthenticatorMethod {\n type: string;\n}\nexport interface IdxAuthenticator {\n displayName: string;\n id: string;\n key: string;\n methods: IdxAuthenticatorMethod[];\n type: string;\n settings?: {\n complexity?: unknown;\n age?: unknown;\n };\n contextualData?: {\n enrolledQuestion?: {\n question: string;\n questionKey: string;\n };\n qrcode?: { \n href: string; \n method: string; \n type: string; \n };\n sharedSecret?: string;\n questions?: {\n questionKey: string;\n question: string;\n }[];\n questionKeys?: string[];\n selectedChannel?: string;\n activationData?: ActivationData;\n challengeData?: ChallengeData;\n };\n credentialId?: string;\n enrollmentId?: string;\n profile?: Record<string, unknown>;\n resend?: Record<string, unknown>;\n poll?: Record<string, unknown>;\n recover?: Record<string, unknown>;\n deviceKnown?: boolean;\n nickname?: string;\n}\n\nexport interface IdxForm {\n value: IdxRemediationValue[];\n}\n\nexport interface IdxOption {\n value: string | {form: IdxForm} | Input[];\n label: string;\n relatesTo?: IdxAuthenticator;\n}\n\nexport interface IdpConfig {\n id: string;\n name: string;\n}\n\nexport interface IdxRemediationValueForm {\n form: IdxForm;\n}\n\nexport interface IdxRemediationValue {\n name: string;\n type?: string;\n required?: boolean;\n secret?: boolean;\n visible?: boolean;\n mutable?: boolean;\n value?: string | IdxRemediationValueForm;\n label?: string;\n form?: IdxForm;\n options?: IdxOption[];\n messages?: IdxMessages;\n minLength?: number;\n maxLength?: number;\n relatesTo?: {\n type?: string;\n value: IdxAuthenticator;\n };\n}\n\nexport interface IdxRemediation {\n name: string;\n label?: string;\n value?: IdxRemediationValue[];\n relatesTo?: {\n type?: string;\n value: IdxAuthenticator;\n };\n idp?: IdpConfig;\n href?: string;\n method?: string;\n type?: string;\n accepts?: string;\n produces?: string;\n refresh?: number;\n rel?: string[];\n action?: (payload?: IdxActionParams) => Promise<IdxResponse>;\n}\n\nexport interface IdxContext {\n version: string;\n stateHandle: string;\n expiresAt: string;\n intent: string;\n currentAuthenticator: {\n type: string;\n value: IdxAuthenticator;\n };\n currentAuthenticatorEnrollment: {\n type: string;\n value: IdxAuthenticator;\n };\n authenticators: {\n type: string;\n value: IdxAuthenticator[];\n };\n authenticatorEnrollments: {\n type: string;\n value: IdxAuthenticator[];\n };\n enrollmentAuthenticator: {\n type: string;\n value: IdxAuthenticator;\n };\n user?: {\n type: string;\n value: Record<string, unknown>;\n };\n uiDisplay?: IdxContextUIDisplay\n app: {\n type: string;\n value: Record<string, unknown>;\n };\n messages?: IdxMessages;\n success?: IdxRemediation;\n failure?: IdxRemediation;\n}\n\nexport interface IdxContextUIDisplay {\n type: string;\n value: {\n label?: string;\n buttonLabel?: string;\n }\n}\n\nexport interface IdxMessage {\n message: string;\n class: string;\n i18n: {\n key: string;\n params?: unknown[];\n };\n}\n\nexport interface IdxMessages {\n type: 'array';\n value: IdxMessage[];\n}\n\n// JSON response from the server\nexport interface RawIdxResponse {\n version: string;\n stateHandle: string;\n intent?: string;\n expiresAt?: string;\n remediation?: {\n type: 'array';\n value: IdxRemediation[];\n };\n messages?: IdxMessages;\n success?: boolean;\n successWithInteractionCode?: IdxRemediation;\n currentAuthenticator?: {\n type: string;\n value: IdxAuthenticator;\n };\n currentAuthenticatorEnrollment?: {\n type: string;\n value: IdxAuthenticator;\n };\n}\n\nexport function isRawIdxResponse(obj: any): obj is RawIdxResponse {\n return obj && obj.version;\n}\n\nexport interface IdxActionParams {\n [key: string]: string | boolean | number | object;\n}\n\nexport interface IdxActions {\n [key: string]: (params?: IdxActionParams) => Promise<IdxResponse>;\n}\n\nexport interface IdxToPersist {\n interactionHandle?: string;\n withCredentials?: boolean;\n}\n\nexport interface IdxActionFunction {\n (params: IdxActionParams): Promise<IdxResponse>;\n neededParams?: Array<Array<IdxRemediationValue>>;\n}\n\nexport interface IdxResponse {\n proceed: (remediationName: string, params: unknown) => Promise<IdxResponse>;\n neededToProceed: IdxRemediation[];\n rawIdxState: RawIdxResponse;\n interactionCode?: string;\n actions: IdxActions;\n toPersist: IdxToPersist;\n context?: IdxContext;\n requestDidSucceed?: boolean;\n stepUp?: boolean;\n}\n\nexport function isIdxResponse(obj: any): obj is IdxResponse {\n return obj && isRawIdxResponse(obj.rawIdxState);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;
|
|
1
|
+
{"version":3,"file":"idx-js.js","sources":["../../../../../lib/idx/types/idx-js.ts"],"sourcesContent":["/* eslint-disable no-use-before-define */\n/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n * \n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { Input } from './api';\n\n\n// TODO: remove when idx-js provides type information\n\nexport interface ChallengeData {\n challenge: string; \n userVerification: string; \n extensions?: {\n appid: string;\n };\n rpId?: string;\n hints?: string[];\n}\nexport interface ActivationData {\n challenge: string;\n rp: {\n name: string;\n id?: string;\n };\n user: {\n id: string;\n name: string;\n displayName: string;\n };\n pubKeyCredParams: {\n type: string;\n alg: number;\n }[];\n attestation?: string;\n authenticatorSelection?: {\n userVerification?: string;\n authenticatorAttachment?: string;\n requireResidentKey?: boolean;\n residentKey?: string;\n };\n excludeCredentials?: {\n id: string;\n type: string;\n }[];\n hints?: string[];\n}\nexport interface IdxAuthenticatorMethod {\n type: string;\n}\nexport interface IdxAuthenticator {\n displayName: string;\n id: string;\n key: string;\n methods: IdxAuthenticatorMethod[];\n type: string;\n settings?: {\n complexity?: unknown;\n age?: unknown;\n };\n contextualData?: {\n enrolledQuestion?: {\n question: string;\n questionKey: string;\n };\n qrcode?: { \n href: string; \n method: string; \n type: string; \n };\n sharedSecret?: string;\n questions?: {\n questionKey: string;\n question: string;\n }[];\n questionKeys?: string[];\n selectedChannel?: string;\n activationData?: ActivationData;\n challengeData?: ChallengeData;\n };\n credentialId?: string;\n transports?: string[];\n enrollmentId?: string;\n profile?: Record<string, unknown>;\n resend?: Record<string, unknown>;\n poll?: Record<string, unknown>;\n recover?: Record<string, unknown>;\n deviceKnown?: boolean;\n nickname?: string;\n}\n\nexport interface IdxForm {\n value: IdxRemediationValue[];\n}\n\nexport interface IdxOption {\n value: string | {form: IdxForm} | Input[];\n label: string;\n relatesTo?: IdxAuthenticator;\n}\n\nexport interface IdpConfig {\n id: string;\n name: string;\n}\n\nexport interface IdxRemediationValueForm {\n form: IdxForm;\n}\n\nexport interface IdxRemediationValue {\n name: string;\n type?: string;\n required?: boolean;\n secret?: boolean;\n visible?: boolean;\n mutable?: boolean;\n value?: string | IdxRemediationValueForm;\n label?: string;\n form?: IdxForm;\n options?: IdxOption[];\n messages?: IdxMessages;\n minLength?: number;\n maxLength?: number;\n relatesTo?: {\n type?: string;\n value: IdxAuthenticator;\n };\n}\n\nexport interface IdxRemediation {\n name: string;\n label?: string;\n value?: IdxRemediationValue[];\n relatesTo?: {\n type?: string;\n value: IdxAuthenticator;\n };\n idp?: IdpConfig;\n href?: string;\n method?: string;\n type?: string;\n accepts?: string;\n produces?: string;\n refresh?: number;\n rel?: string[];\n action?: (payload?: IdxActionParams) => Promise<IdxResponse>;\n}\n\nexport interface IdxContext {\n version: string;\n stateHandle: string;\n expiresAt: string;\n intent: string;\n currentAuthenticator: {\n type: string;\n value: IdxAuthenticator;\n };\n currentAuthenticatorEnrollment: {\n type: string;\n value: IdxAuthenticator;\n };\n authenticators: {\n type: string;\n value: IdxAuthenticator[];\n };\n authenticatorEnrollments: {\n type: string;\n value: IdxAuthenticator[];\n };\n enrollmentAuthenticator: {\n type: string;\n value: IdxAuthenticator;\n };\n user?: {\n type: string;\n value: Record<string, unknown>;\n };\n uiDisplay?: IdxContextUIDisplay\n app: {\n type: string;\n value: Record<string, unknown>;\n };\n messages?: IdxMessages;\n success?: IdxRemediation;\n failure?: IdxRemediation;\n}\n\nexport interface IdxContextUIDisplay {\n type: string;\n value: {\n label?: string;\n buttonLabel?: string;\n }\n}\n\nexport interface IdxMessage {\n message: string;\n class: string;\n i18n: {\n key: string;\n params?: unknown[];\n };\n}\n\nexport interface IdxMessages {\n type: 'array';\n value: IdxMessage[];\n}\n\n// JSON response from the server\nexport interface RawIdxResponse {\n version: string;\n stateHandle: string;\n intent?: string;\n expiresAt?: string;\n remediation?: {\n type: 'array';\n value: IdxRemediation[];\n };\n messages?: IdxMessages;\n success?: boolean;\n successWithInteractionCode?: IdxRemediation;\n currentAuthenticator?: {\n type: string;\n value: IdxAuthenticator;\n };\n currentAuthenticatorEnrollment?: {\n type: string;\n value: IdxAuthenticator;\n };\n}\n\nexport function isRawIdxResponse(obj: any): obj is RawIdxResponse {\n return obj && obj.version;\n}\n\nexport interface IdxActionParams {\n [key: string]: string | boolean | number | object;\n}\n\nexport interface IdxActions {\n [key: string]: (params?: IdxActionParams) => Promise<IdxResponse>;\n}\n\nexport interface IdxToPersist {\n interactionHandle?: string;\n withCredentials?: boolean;\n}\n\nexport interface IdxActionFunction {\n (params: IdxActionParams): Promise<IdxResponse>;\n neededParams?: Array<Array<IdxRemediationValue>>;\n}\n\nexport interface IdxResponse {\n proceed: (remediationName: string, params: unknown) => Promise<IdxResponse>;\n neededToProceed: IdxRemediation[];\n rawIdxState: RawIdxResponse;\n interactionCode?: string;\n actions: IdxActions;\n toPersist: IdxToPersist;\n context?: IdxContext;\n requestDidSucceed?: boolean;\n stepUp?: boolean;\n}\n\nexport function isIdxResponse(obj: any): obj is IdxResponse {\n return obj && isRawIdxResponse(obj.rawIdxState);\n}\n"],"names":[],"mappings":";;;;;;;;;;;;AAiPM,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAgB,CAAC,CAAA,CAAA,CAAQ,CAAA,CAAA,CAAA;AACvC,CAAA,CAAA,CAAA,CAAA,OAAO,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAI,CAAG,CAAA,CAAA,CAAC,OAAO,CAAC;AAC5B,CAAA;;"}
|
package/esm/node/idx/webauthn.js
CHANGED
|
@@ -15,35 +15,33 @@ import { base64UrlToBuffer, bufferToBase64Url } from '../crypto/base64.js';
|
|
|
15
15
|
const getEnrolledCredentials = (authenticatorEnrollments = []) => {
|
|
16
16
|
const credentials = [];
|
|
17
17
|
authenticatorEnrollments.forEach((enrollement) => {
|
|
18
|
+
var _a, _b;
|
|
18
19
|
if (enrollement.key === 'webauthn') {
|
|
19
|
-
|
|
20
|
+
const credential = {
|
|
20
21
|
type: 'public-key',
|
|
21
22
|
id: base64UrlToBuffer(enrollement.credentialId),
|
|
22
|
-
}
|
|
23
|
+
};
|
|
24
|
+
const transports = (_a = enrollement.transports) !== null && _a !== void 0 ? _a : (_b = enrollement.profile) === null || _b === void 0 ? void 0 : _b.transports;
|
|
25
|
+
if (Array.isArray(transports)) {
|
|
26
|
+
credential.transports = transports;
|
|
27
|
+
}
|
|
28
|
+
credentials.push(credential);
|
|
23
29
|
}
|
|
24
30
|
});
|
|
25
31
|
return credentials;
|
|
26
32
|
};
|
|
27
33
|
const buildCredentialCreationOptions = (activationData, authenticatorEnrollments) => {
|
|
28
34
|
return {
|
|
29
|
-
publicKey: {
|
|
30
|
-
rp: activationData.rp,
|
|
31
|
-
user: {
|
|
35
|
+
publicKey: Object.assign({ rp: activationData.rp, user: {
|
|
32
36
|
id: base64UrlToBuffer(activationData.user.id),
|
|
33
37
|
name: activationData.user.name,
|
|
34
38
|
displayName: activationData.user.displayName
|
|
35
|
-
},
|
|
36
|
-
challenge: base64UrlToBuffer(activationData.challenge),
|
|
37
|
-
pubKeyCredParams: activationData.pubKeyCredParams,
|
|
38
|
-
attestation: activationData.attestation,
|
|
39
|
-
authenticatorSelection: activationData.authenticatorSelection,
|
|
40
|
-
excludeCredentials: getEnrolledCredentials(authenticatorEnrollments),
|
|
41
|
-
}
|
|
39
|
+
}, challenge: base64UrlToBuffer(activationData.challenge), pubKeyCredParams: activationData.pubKeyCredParams, attestation: activationData.attestation, authenticatorSelection: activationData.authenticatorSelection, excludeCredentials: getEnrolledCredentials(authenticatorEnrollments) }, (activationData.hints && { hints: activationData.hints }))
|
|
42
40
|
};
|
|
43
41
|
};
|
|
44
42
|
const buildCredentialRequestOptions = (challengeData, authenticatorEnrollments) => {
|
|
45
43
|
return {
|
|
46
|
-
publicKey: Object.assign({ challenge: base64UrlToBuffer(challengeData.challenge), userVerification: challengeData.userVerification, allowCredentials: getEnrolledCredentials(authenticatorEnrollments) }, (challengeData.rpId && { rpId: challengeData.rpId }))
|
|
44
|
+
publicKey: Object.assign(Object.assign({ challenge: base64UrlToBuffer(challengeData.challenge), userVerification: challengeData.userVerification, allowCredentials: getEnrolledCredentials(authenticatorEnrollments) }, (challengeData.rpId && { rpId: challengeData.rpId })), (challengeData.hints && { hints: challengeData.hints }))
|
|
47
45
|
};
|
|
48
46
|
};
|
|
49
47
|
const getAttestation = (credential) => {
|
|
@@ -51,11 +49,16 @@ const getAttestation = (credential) => {
|
|
|
51
49
|
const id = credential.id;
|
|
52
50
|
const clientData = bufferToBase64Url(response.clientDataJSON);
|
|
53
51
|
const attestation = bufferToBase64Url(response.attestationObject);
|
|
54
|
-
|
|
52
|
+
const getTransportsFn = response.getTransports;
|
|
53
|
+
const result = {
|
|
55
54
|
id,
|
|
56
55
|
clientData,
|
|
57
|
-
attestation
|
|
56
|
+
attestation,
|
|
58
57
|
};
|
|
58
|
+
if (typeof getTransportsFn === 'function') {
|
|
59
|
+
result.transports = JSON.stringify(getTransportsFn.call(response));
|
|
60
|
+
}
|
|
61
|
+
return result;
|
|
59
62
|
};
|
|
60
63
|
const getAssertion = (credential) => {
|
|
61
64
|
const response = credential.response;
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"webauthn.js","sources":["../../../../lib/idx/webauthn.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { base64UrlToBuffer, bufferToBase64Url } from '../crypto/base64';\nimport {\n ActivationData,\n ChallengeData,\n IdxAuthenticator,\n} from './types';\n\n\n// Get known credentials from list of enrolled authenticators\nconst getEnrolledCredentials = (authenticatorEnrollments: IdxAuthenticator[] = []) => {\n const credentials: PublicKeyCredentialDescriptor[] = [];\n authenticatorEnrollments.forEach((enrollement) => {\n if (enrollement.key === 'webauthn') {\n credentials.push({\n type: 'public-key',\n id: base64UrlToBuffer(enrollement.credentialId),\n });\n }\n });\n return credentials;\n};\n\n// Build options for navigator.credentials.create\n// https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/create\nexport const buildCredentialCreationOptions = (\n activationData: ActivationData, authenticatorEnrollments: IdxAuthenticator[]\n) => {\n return {\n publicKey: {\n rp: activationData.rp,\n user: {\n id: base64UrlToBuffer(activationData.user.id),\n name: activationData.user.name,\n displayName: activationData.user.displayName\n },\n challenge: base64UrlToBuffer(activationData.challenge),\n pubKeyCredParams: activationData.pubKeyCredParams,\n attestation: activationData.attestation,\n authenticatorSelection: activationData.authenticatorSelection,\n excludeCredentials: getEnrolledCredentials(authenticatorEnrollments),\n }\n } as CredentialCreationOptions;\n};\n\n\n// Build options for navigator.credentials.get\n// https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/get\nexport const buildCredentialRequestOptions = (\n challengeData: ChallengeData, authenticatorEnrollments: IdxAuthenticator[]\n) => {\n return {\n publicKey: {\n challenge: base64UrlToBuffer(challengeData.challenge),\n userVerification: challengeData.userVerification,\n allowCredentials: getEnrolledCredentials(authenticatorEnrollments),\n ...(challengeData.rpId && { rpId: challengeData.rpId }),\n }\n } as CredentialRequestOptions;\n};\n\n// Build attestation for webauthn enroll\n// https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAttestationResponse\nexport const getAttestation = (credential: PublicKeyCredential) => {\n const response = credential.response as AuthenticatorAttestationResponse;\n const id = credential.id;\n const clientData = bufferToBase64Url(response.clientDataJSON);\n const attestation = bufferToBase64Url(response.attestationObject);\n return {\n id,\n clientData,\n attestation\n };\n};\n\n// Build assertion for webauthn verification\n// https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAssertionResponse\nexport const getAssertion = (credential: PublicKeyCredential) => {\n const response = credential.response as AuthenticatorAssertionResponse;\n const id = credential.id;\n const clientData = bufferToBase64Url(response.clientDataJSON);\n const authenticatorData = bufferToBase64Url(response.authenticatorData);\n const signatureData = bufferToBase64Url(response.signature);\n return {\n id,\n clientData,\n authenticatorData,\n signatureData\n };\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAqBA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,sBAAsB,CAAG,CAA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AA,CAAA;KACd,CAAC;AACJ,CAAA,CAAA;;"}
|
|
1
|
+
{"version":3,"file":"webauthn.js","sources":["../../../../lib/idx/webauthn.ts"],"sourcesContent":["/*!\n * Copyright (c) 2015-present, Okta, Inc. and/or its affiliates. All rights reserved.\n * The Okta software accompanied by this notice is provided pursuant to the Apache License, Version 2.0 (the \"License.\")\n *\n * You may obtain a copy of the License at http://www.apache.org/licenses/LICENSE-2.0.\n * Unless required by applicable law or agreed to in writing, software\n * distributed under the License is distributed on an \"AS IS\" BASIS, WITHOUT\n * WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.\n *\n * See the License for the specific language governing permissions and limitations under the License.\n */\n\nimport { base64UrlToBuffer, bufferToBase64Url } from '../crypto/base64';\nimport {\n ActivationData,\n ChallengeData,\n IdxAuthenticator,\n WebauthnEnrollValues,\n WebauthnVerificationValues,\n} from './types';\n\n\n// Get known credentials from list of enrolled authenticators\nconst getEnrolledCredentials = (authenticatorEnrollments: IdxAuthenticator[] = []) => {\n const credentials: PublicKeyCredentialDescriptor[] = [];\n authenticatorEnrollments.forEach((enrollement) => {\n if (enrollement.key === 'webauthn') {\n const credential: PublicKeyCredentialDescriptor = {\n type: 'public-key',\n id: base64UrlToBuffer(enrollement.credentialId),\n };\n // transports may be at top-level or nested under profile\n const transports = enrollement.transports\n ?? (enrollement.profile as Record<string, unknown> | undefined)?.transports;\n if (Array.isArray(transports)) {\n credential.transports = transports as AuthenticatorTransport[];\n }\n credentials.push(credential);\n }\n });\n return credentials;\n};\n\n// Build options for navigator.credentials.create\n// https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/create\nexport const buildCredentialCreationOptions = (\n activationData: ActivationData, authenticatorEnrollments: IdxAuthenticator[]\n) => {\n return {\n publicKey: {\n rp: activationData.rp,\n user: {\n id: base64UrlToBuffer(activationData.user.id),\n name: activationData.user.name,\n displayName: activationData.user.displayName\n },\n challenge: base64UrlToBuffer(activationData.challenge),\n pubKeyCredParams: activationData.pubKeyCredParams,\n attestation: activationData.attestation,\n authenticatorSelection: activationData.authenticatorSelection,\n excludeCredentials: getEnrolledCredentials(authenticatorEnrollments),\n ...(activationData.hints && { hints: activationData.hints }),\n }\n } as CredentialCreationOptions;\n};\n\n\n// Build options for navigator.credentials.get\n// https://developer.mozilla.org/en-US/docs/Web/API/CredentialsContainer/get\nexport const buildCredentialRequestOptions = (\n challengeData: ChallengeData, authenticatorEnrollments: IdxAuthenticator[]\n) => {\n return {\n publicKey: {\n challenge: base64UrlToBuffer(challengeData.challenge),\n userVerification: challengeData.userVerification,\n allowCredentials: getEnrolledCredentials(authenticatorEnrollments),\n ...(challengeData.rpId && { rpId: challengeData.rpId }),\n ...(challengeData.hints && { hints: challengeData.hints }),\n }\n } as CredentialRequestOptions;\n};\n\n// Build attestation for webauthn enroll\n// https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAttestationResponse\nexport const getAttestation = (credential: PublicKeyCredential): WebauthnEnrollValues => {\n const response = credential.response as AuthenticatorAttestationResponse;\n const id = credential.id;\n const clientData = bufferToBase64Url(response.clientDataJSON);\n const attestation = bufferToBase64Url(response.attestationObject);\n // getTransports() is a newer WebAuthn API not yet in all TS type definitions\n const getTransportsFn = (response as any).getTransports;\n const result: WebauthnEnrollValues = {\n id,\n clientData,\n attestation,\n };\n if (typeof getTransportsFn === 'function') {\n result.transports = JSON.stringify(getTransportsFn.call(response));\n }\n return result;\n};\n\n// Build assertion for webauthn verification\n// https://developer.mozilla.org/en-US/docs/Web/API/AuthenticatorAssertionResponse\nexport const getAssertion = (credential: PublicKeyCredential): WebauthnVerificationValues => {\n const response = credential.response as AuthenticatorAssertionResponse;\n const id = credential.id;\n const clientData = bufferToBase64Url(response.clientDataJSON);\n const authenticatorData = bufferToBase64Url(response.authenticatorData);\n const signatureData = bufferToBase64Url(response.signature);\n return {\n id,\n clientData,\n authenticatorData,\n signatureData\n };\n};\n"],"names":[],"mappings":";;;;;;;;;;;;;;AAuBA,CAAA,CAAA,CAAA,CAA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A,CAAA,CAAA,CAAA,CAAC,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,CAAC;CACxE,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAM,aAAa,CAAG,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAiB,CAAC,CAAQ,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,CAAS,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAC,CAAC;IAC5D,CAAO,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;QACL,CAAE,CAAA,CAAA;QACF,CAAU,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;QACV,CAAiB,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;QACjB,CAAa,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA,CAAA;KACd,CAAC;AACJ,CAAA,CAAA;;"}
|
package/esm/node/package.json
CHANGED
package/package.json
CHANGED
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
"private": false,
|
|
3
3
|
"name": "@okta/okta-auth-js",
|
|
4
4
|
"description": "The Okta Auth SDK",
|
|
5
|
-
"version": "7.14.
|
|
5
|
+
"version": "7.14.2",
|
|
6
6
|
"homepage": "https://github.com/okta/okta-auth-js",
|
|
7
7
|
"license": "Apache-2.0",
|
|
8
8
|
"main": "cjs/exports/default.js",
|
|
@@ -239,7 +239,7 @@
|
|
|
239
239
|
"directory": "test/types"
|
|
240
240
|
},
|
|
241
241
|
"okta": {
|
|
242
|
-
"commitSha": "
|
|
243
|
-
"fullVersion": "7.14.
|
|
242
|
+
"commitSha": "e5b7bf51568884c3de71ffb5fb302a5dde877745",
|
|
243
|
+
"fullVersion": "7.14.2-ge5b7bf5"
|
|
244
244
|
}
|
|
245
245
|
}
|
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { Authenticator, Credentials } from './Authenticator';
|
|
2
2
|
export interface WebauthnEnrollValues {
|
|
3
|
+
id?: string;
|
|
3
4
|
clientData?: string;
|
|
4
5
|
attestation?: string;
|
|
5
6
|
credentials?: Credentials;
|
|
7
|
+
transports?: string;
|
|
6
8
|
}
|
|
7
9
|
export declare class WebauthnEnrollment extends Authenticator<WebauthnEnrollValues> {
|
|
8
10
|
canVerify(values: WebauthnEnrollValues): boolean;
|
|
@@ -17,6 +17,7 @@ export interface ChallengeData {
|
|
|
17
17
|
appid: string;
|
|
18
18
|
};
|
|
19
19
|
rpId?: string;
|
|
20
|
+
hints?: string[];
|
|
20
21
|
}
|
|
21
22
|
export interface ActivationData {
|
|
22
23
|
challenge: string;
|
|
@@ -44,6 +45,7 @@ export interface ActivationData {
|
|
|
44
45
|
id: string;
|
|
45
46
|
type: string;
|
|
46
47
|
}[];
|
|
48
|
+
hints?: string[];
|
|
47
49
|
}
|
|
48
50
|
export interface IdxAuthenticatorMethod {
|
|
49
51
|
type: string;
|
|
@@ -79,6 +81,7 @@ export interface IdxAuthenticator {
|
|
|
79
81
|
challengeData?: ChallengeData;
|
|
80
82
|
};
|
|
81
83
|
credentialId?: string;
|
|
84
|
+
transports?: string[];
|
|
82
85
|
enrollmentId?: string;
|
|
83
86
|
profile?: Record<string, unknown>;
|
|
84
87
|
resend?: Record<string, unknown>;
|