You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/mix/tasks/hex.repo.ex
+18-24Lines changed: 18 additions & 24 deletions
Original file line number
Diff line number
Diff line change
@@ -41,7 +41,12 @@ defmodule Mix.Tasks.Hex.Repo do
41
41
42
42
* `--fetch-public-key FINGERPRINT` - Download public key from the repository and verify against the fingerprint (optional).
43
43
44
-
* `--no-oauth-exchange` - Disable OAuth token exchange for API keys. Use the API key directly instead of exchanging it for a short-lived OAuth token (optional).
44
+
* `--oauth-exchange` - Enable OAuth token exchange for API keys. Exchange the API key for a short-lived OAuth token
45
+
instead of using the API key directly. Defaults to enabled for hexpm, disabled for other repositories.
46
+
In the future, this will default to enabled for all repositories (optional).
47
+
48
+
* `--no-oauth-exchange` - Disable OAuth token exchange for API keys. Use the API key directly instead of exchanging
49
+
it for a short-lived OAuth token. Currently a no-op, but will disable OAuth token exchange in the future (optional).
45
50
46
51
* `--oauth-exchange-url URL` - Custom URL for OAuth token exchange. By default, the API URL is used (optional).
47
52
@@ -50,6 +55,7 @@ defmodule Mix.Tasks.Hex.Repo do
50
55
$ mix hex.repo set NAME --url URL
51
56
$ mix hex.repo set NAME --public-key PATH
52
57
$ mix hex.repo set NAME --auth-key KEY
58
+
$ mix hex.repo set NAME --oauth-exchange
53
59
$ mix hex.repo set NAME --no-oauth-exchange
54
60
$ mix hex.repo set NAME --oauth-exchange-url URL
55
61
@@ -72,14 +78,14 @@ defmodule Mix.Tasks.Hex.Repo do
72
78
public_key: :string,
73
79
auth_key: :string,
74
80
fetch_public_key: :string,
75
-
no_oauth_exchange: :boolean,
81
+
oauth_exchange: :boolean,
76
82
oauth_exchange_url: :string
77
83
]
78
84
@set_switches[
79
85
url: :string,
80
86
public_key: :string,
81
87
auth_key: :string,
82
-
no_oauth_exchange: :boolean,
88
+
oauth_exchange: :boolean,
83
89
oauth_exchange_url: :string
84
90
]
85
91
@show_switches[
@@ -143,15 +149,17 @@ defmodule Mix.Tasks.Hex.Repo do
0 commit comments