npm-token.1 3.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576
  1. .TH "NPM\-TOKEN" "1" "August 2021" "" ""
  2. .SH "NAME"
  3. \fBnpm-token\fR \- Manage your authentication tokens
  4. .SS Synopsis
  5. .P
  6. .RS 2
  7. .nf
  8. npm token list [\-\-json|\-\-parseable]
  9. npm token create [\-\-read\-only] [\-\-cidr=1\.1\.1\.1/24,2\.2\.2\.2/16]
  10. npm token revoke <id|token>
  11. .fi
  12. .RE
  13. .SS Description
  14. .P
  15. This lets you list, create and revoke authentication tokens\.
  16. .RS 0
  17. .IP \(bu 2
  18. \fBnpm token list\fP:
  19. Shows a table of all active authentication tokens\. You can request this as
  20. JSON with \fB\-\-json\fP or tab\-separated values with \fB\-\-parseable\fP\|\.
  21. .RE
  22. .P
  23. .RS 2
  24. .nf
  25. +\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  26. | id | token | created | read\-only | CIDR whitelist |
  27. +\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  28. | 7f3134 | 1fa9ba… | 2017\-10\-02 | yes | |
  29. +\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  30. | c03241 | af7aef… | 2017\-10\-02 | no | 192\.168\.0\.1/24 |
  31. +\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  32. | e0cf92 | 3a436a… | 2017\-10\-02 | no | |
  33. +\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  34. | 63eb9d | 74ef35… | 2017\-09\-28 | no | |
  35. +\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  36. | 2daaa8 | cbad5f… | 2017\-09\-26 | no | |
  37. +\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  38. | 68c2fe | 127e51… | 2017\-09\-23 | no | |
  39. +\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  40. | 6334e1 | 1dadd1… | 2017\-09\-23 | no | |
  41. +\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  42. .fi
  43. .RE
  44. .RS 0
  45. .IP \(bu 2
  46. \fBnpm token create [\-\-read\-only] [\-\-cidr=<cidr\-ranges>]\fP:
  47. Create a new authentication token\. It can be \fB\-\-read\-only\fP or accept a list of
  48. CIDR \fIhttps://en\.wikipedia\.org/wiki/Classless_Inter\-Domain_Routing\fR ranges to
  49. limit use of this token to\. This will prompt you for your password, and, if you have
  50. two\-factor authentication enabled, an otp\.
  51. .RE
  52. .P
  53. .RS 2
  54. .nf
  55. +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  56. | token | a73c9572\-f1b9\-8983\-983d\-ba3ac3cc913d |
  57. +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  58. | cidr_whitelist | |
  59. +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  60. | readonly | false |
  61. +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  62. | created | 2017\-10\-02T07:52:24\.838Z |
  63. +\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-+
  64. .fi
  65. .RE
  66. .RS 0
  67. .IP \(bu 2
  68. \fBnpm token revoke <token|id>\fP:
  69. This removes an authentication token, making it immediately unusable\. This can accept
  70. both complete tokens (as you get back from \fBnpm token create\fP and will
  71. find in your \fB\|\.npmrc\fP) and ids as seen in the \fBnpm token list\fP output\.
  72. This will NOT accept the truncated token found in \fBnpm token list\fP output\.
  73. .RE