-
Notifications
You must be signed in to change notification settings - Fork 3
Add fido entry point to davinci client package #744
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,94 @@ | ||
| ## API Report File for "@forgerock/davinci-client" | ||
|
|
||
| > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/). | ||
|
|
||
| ```ts | ||
|
|
||
| import type { GenericError } from '@forgerock/sdk-types'; | ||
|
|
||
| // @public (undocumented) | ||
| export interface AssertionValue extends Omit<PublicKeyCredential, 'rawId' | 'response' | 'getClientExtensionResults' | 'toJSON'> { | ||
| // (undocumented) | ||
| rawId: string; | ||
| // (undocumented) | ||
| response: { | ||
| clientDataJSON: string; | ||
| authenticatorData: string; | ||
| signature: string; | ||
| userHandle: string | null; | ||
| }; | ||
| } | ||
|
|
||
| // @public (undocumented) | ||
| export interface AttestationValue extends Omit<PublicKeyCredential, 'rawId' | 'response' | 'getClientExtensionResults' | 'toJSON'> { | ||
| // (undocumented) | ||
| rawId: string; | ||
| // (undocumented) | ||
| response: { | ||
| clientDataJSON: string; | ||
| attestationObject: string; | ||
| }; | ||
| } | ||
|
|
||
| // @public | ||
| export function fido(): FidoClient; | ||
|
|
||
| // @public (undocumented) | ||
| export interface FidoAuthenticationInputValue { | ||
| // (undocumented) | ||
| assertionValue?: AssertionValue; | ||
| } | ||
|
|
||
| // @public (undocumented) | ||
| export interface FidoAuthenticationOptions extends Omit<PublicKeyCredentialRequestOptions, 'challenge' | 'allowCredentials'> { | ||
| // (undocumented) | ||
| allowCredentials?: { | ||
| id: number[]; | ||
| transports?: AuthenticatorTransport[]; | ||
| type: PublicKeyCredentialType; | ||
| }[]; | ||
| // (undocumented) | ||
| challenge: number[]; | ||
| } | ||
|
|
||
| // @public (undocumented) | ||
| export interface FidoClient { | ||
| authenticate: (options: FidoAuthenticationOptions) => Promise<FidoAuthenticationInputValue | GenericError>; | ||
| register: (options: FidoRegistrationOptions) => Promise<FidoRegistrationInputValue | GenericError>; | ||
| } | ||
|
|
||
| // @public | ||
| export type FidoErrorCode = 'NotAllowedError' | 'AbortError' | 'InvalidStateError' | 'NotSupportedError' | 'SecurityError' | 'TimeoutError' | 'UnknownError'; | ||
|
|
||
| // @public (undocumented) | ||
| export interface FidoRegistrationInputValue { | ||
| // (undocumented) | ||
| attestationValue?: AttestationValue; | ||
| } | ||
|
|
||
| // @public (undocumented) | ||
| export interface FidoRegistrationOptions extends Omit<PublicKeyCredentialCreationOptions, 'challenge' | 'user' | 'pubKeyCredParams' | 'excludeCredentials'> { | ||
| // (undocumented) | ||
| challenge: number[]; | ||
| // (undocumented) | ||
| excludeCredentials?: { | ||
| id: number[]; | ||
| transports?: AuthenticatorTransport[]; | ||
| type: PublicKeyCredentialType; | ||
| }[]; | ||
| // (undocumented) | ||
| pubKeyCredParams: { | ||
| alg: string | number; | ||
| type: PublicKeyCredentialType; | ||
| }[]; | ||
| // (undocumented) | ||
| user: { | ||
| id: number[]; | ||
| name: string; | ||
| displayName: string; | ||
| }; | ||
| } | ||
|
|
||
| // (No @packageDocumentation comment for this package) | ||
|
|
||
| ``` |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,11 +1,11 @@ | ||
| /* | ||
| * Copyright (c) 2025 Ping Identity Corporation. All rights reserved. | ||
| * Copyright (c) 2025 - 2026 Ping Identity Corporation. All rights reserved. | ||
| * | ||
| * This software may be modified and distributed under the terms | ||
| * of the MIT license. See the LICENSE file for details. | ||
| */ | ||
| import { fido } from './lib/fido/fido.js'; | ||
|
|
||
| // davinci is re-exported via types.ts | ||
| export { fido }; | ||
| export { davinci } from './lib/client.store.js'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly, we can remove davinci export from https://github.com/ForgeRock/ping-javascript-sdk/blob/aj-fix-types/packages/davinci-client/src/types.ts#L37 There is no public API impact either because we exported everything from types.ts file anyway in index file, so removing it now from types.ts is just an internal change.
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How did this even work to begin with? We were not exporting the
Collaborator
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. this was because of the api-extractor code i added. |
||
| export { fido } from './lib/fido/fido.js'; | ||
|
|
||
| export * from './types.js'; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,10 @@ | ||
| /* | ||
| * Copyright (c) 2026 Ping Identity Corporation. All rights reserved. | ||
| * | ||
| * This software may be modified and distributed under the terms | ||
| * of the MIT license. See the LICENSE file for details. | ||
| */ | ||
|
|
||
| // Re-export FIDO module and types for package.json `./fido` entry point | ||
| export { fido } from './fido.js'; | ||
|
vatsalparikh marked this conversation as resolved.
|
||
| export * from './fido.types.js'; | ||
|
Comment on lines
+8
to
+10
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🎯 Functional Correctness | 🟠 Major | ⚡ Quick win Cover the new FIDO barrel before merging. Codecov reports this changed file as uncovered, leaving patch coverage at 14.28571% against the 40% gate. Add a focused test that imports 🤖 Prompt for AI Agents |
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| /* | ||
| * Copyright (c) 2025 Ping Identity Corporation. All rights reserved. | ||
| * Copyright (c) 2025 - 2026 Ping Identity Corporation. All rights reserved. | ||
| * | ||
| * This software may be modified and distributed under the terms | ||
| * of the MIT license. See the LICENSE file for details. | ||
| */ | ||
| // deviceClient is re-exported via types.js | ||
| export { deviceClient } from './lib/device.store.js'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Similarly, we can now remove the export of deviceClient from types.ts file. There is no public API impact either because we exported everything from types.ts file anyway in index file, so removing it now from types.ts is just an internal change. |
||
| export * from './types.js'; | ||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,8 +1,8 @@ | ||
| /* | ||
| * Copyright (c) 2025 Ping Identity Corporation. All rights reserved. | ||
| * Copyright (c) 2025 - 2026 Ping Identity Corporation. All rights reserved. | ||
| * | ||
| * This software may be modified and distributed under the terms | ||
| * of the MIT license. See the LICENSE file for details. | ||
| */ | ||
| // oidc and createClientStore are re-exported via types.js | ||
| export { oidc } from './lib/client.store.js'; | ||
|
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Now that we're exporting oidc from index.ts file I think we can remove the oidc export from types.ts file. There is no public API impact either because we exported everything from types.ts file anyway in index file, so removing it now from types.ts is just an internal change. |
||
| export * from './types.js'; | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This should be
module