From d00685bff7ef084a06313553e1968911487e4bf4 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Julian=20M=C3=B8ller=20Ellehauge?= Date: Tue, 28 Jun 2022 14:09:03 +0200 Subject: [PATCH] Re-add webauthn --- docs/content/commands/npm-adduser.md | 6 +++--- docs/content/using-npm/config.md | 6 +++--- lib/commands/adduser.js | 1 + lib/utils/config/definitions.js | 4 ++-- tap-snapshots/test/lib/load-all-commands.js.test.cjs | 4 ++-- tap-snapshots/test/lib/npm.js.test.cjs | 4 ++-- tap-snapshots/test/lib/utils/config/definitions.js.test.cjs | 6 +++--- .../test/lib/utils/config/describe-all.js.test.cjs | 6 +++--- 8 files changed, 19 insertions(+), 18 deletions(-) diff --git a/docs/content/commands/npm-adduser.md b/docs/content/commands/npm-adduser.md index 712204a13b8ed..4e81ded69ab4f 100644 --- a/docs/content/commands/npm-adduser.md +++ b/docs/content/commands/npm-adduser.md @@ -93,9 +93,9 @@ npm init --scope=@foo --yes #### `auth-type` * Default: "legacy" -* Type: "legacy", "web", "sso", "saml", or "oauth" -* DEPRECATED: The SSO/SAML/OAuth methods are deprecated and will be removed in - a future version of npm in favor of web-based login. +* Type: "legacy", "web", "sso", "saml", "oauth", or "webauthn" +* DEPRECATED: The SSO/SAML/OAuth/Webauthn methods are deprecated and will be + removed in a future version of npm in favor of web-based login. What authentication strategy to use with `adduser`/`login`. diff --git a/docs/content/using-npm/config.md b/docs/content/using-npm/config.md index 68c46b4f4e668..dccd6cbc4a4f0 100644 --- a/docs/content/using-npm/config.md +++ b/docs/content/using-npm/config.md @@ -1908,9 +1908,9 @@ When set to `dev` or `development`, this is an alias for `--include=dev`. #### `auth-type` * Default: "legacy" -* Type: "legacy", "web", "sso", "saml", or "oauth" -* DEPRECATED: The SSO/SAML/OAuth methods are deprecated and will be removed in - a future version of npm in favor of web-based login. +* Type: "legacy", "web", "sso", "saml", "oauth", or "webauthn" +* DEPRECATED: The SSO/SAML/OAuth/Webauthn methods are deprecated and will be + removed in a future version of npm in favor of web-based login. What authentication strategy to use with `adduser`/`login`. diff --git a/lib/commands/adduser.js b/lib/commands/adduser.js index 0575b026d94f8..bc867d8ef7c20 100644 --- a/lib/commands/adduser.js +++ b/lib/commands/adduser.js @@ -4,6 +4,7 @@ const BaseCommand = require('../base-command.js') const authTypes = { legacy: require('../auth/legacy.js'), web: require('../auth/legacy.js'), + webauthn: require('../auth/legacy.js'), oauth: require('../auth/oauth.js'), saml: require('../auth/saml.js'), sso: require('../auth/sso.js'), diff --git a/lib/utils/config/definitions.js b/lib/utils/config/definitions.js index 0063094199ca5..6ead5bc9a8baf 100644 --- a/lib/utils/config/definitions.js +++ b/lib/utils/config/definitions.js @@ -238,9 +238,9 @@ define('audit-level', { define('auth-type', { default: 'legacy', - type: ['legacy', 'web', 'sso', 'saml', 'oauth'], + type: ['legacy', 'web', 'sso', 'saml', 'oauth', 'webauthn'], deprecated: ` - The SSO/SAML/OAuth methods are deprecated and will be removed in + The SSO/SAML/OAuth/Webauthn methods are deprecated and will be removed in a future version of npm in favor of web-based login. `, description: ` diff --git a/tap-snapshots/test/lib/load-all-commands.js.test.cjs b/tap-snapshots/test/lib/load-all-commands.js.test.cjs index bca8495df688b..f92cd84806b61 100644 --- a/tap-snapshots/test/lib/load-all-commands.js.test.cjs +++ b/tap-snapshots/test/lib/load-all-commands.js.test.cjs @@ -33,7 +33,7 @@ npm adduser Options: [--registry ] [--scope <@scope>] -[--auth-type ] +[--auth-type ] aliases: login, add-user @@ -499,7 +499,7 @@ npm adduser Options: [--registry ] [--scope <@scope>] -[--auth-type ] +[--auth-type ] aliases: login, add-user diff --git a/tap-snapshots/test/lib/npm.js.test.cjs b/tap-snapshots/test/lib/npm.js.test.cjs index cb97742e8cc91..423c3b8f95da6 100644 --- a/tap-snapshots/test/lib/npm.js.test.cjs +++ b/tap-snapshots/test/lib/npm.js.test.cjs @@ -190,7 +190,7 @@ All commands: Options: [--registry ] [--scope <@scope>] - [--auth-type ] + [--auth-type ] aliases: login, add-user @@ -577,7 +577,7 @@ All commands: Options: [--registry ] [--scope <@scope>] - [--auth-type ] + [--auth-type ] aliases: login, add-user diff --git a/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs b/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs index 783027791e612..08958e6bcf383 100644 --- a/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs +++ b/tap-snapshots/test/lib/utils/config/definitions.js.test.cjs @@ -253,9 +253,9 @@ exports[`test/lib/utils/config/definitions.js TAP > config description for auth- #### \`auth-type\` * Default: "legacy" -* Type: "legacy", "web", "sso", "saml", or "oauth" -* DEPRECATED: The SSO/SAML/OAuth methods are deprecated and will be removed in - a future version of npm in favor of web-based login. +* Type: "legacy", "web", "sso", "saml", "oauth", or "webauthn" +* DEPRECATED: The SSO/SAML/OAuth/Webauthn methods are deprecated and will be + removed in a future version of npm in favor of web-based login. What authentication strategy to use with \`adduser\`/\`login\`. diff --git a/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs b/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs index 8e2feef942965..13b1d8cff19f5 100644 --- a/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs +++ b/tap-snapshots/test/lib/utils/config/describe-all.js.test.cjs @@ -1781,9 +1781,9 @@ When set to \`dev\` or \`development\`, this is an alias for \`--include=dev\`. #### \`auth-type\` * Default: "legacy" -* Type: "legacy", "web", "sso", "saml", or "oauth" -* DEPRECATED: The SSO/SAML/OAuth methods are deprecated and will be removed in - a future version of npm in favor of web-based login. +* Type: "legacy", "web", "sso", "saml", "oauth", or "webauthn" +* DEPRECATED: The SSO/SAML/OAuth/Webauthn methods are deprecated and will be + removed in a future version of npm in favor of web-based login. What authentication strategy to use with \`adduser\`/\`login\`.