@cloudflare/workers-auth 0.5.5 → 0.6.0
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/dist/cf/index.d.mts +3 -3
- package/dist/cf/index.mjs +6 -3
- package/dist/{chunk-PBW6773T.mjs → chunk-7AYQ2BAF.mjs} +404 -18
- package/dist/{chunk-RTFTHYPD.mjs → chunk-AEOSGWMT.mjs} +9 -3
- package/dist/{file-format-B1KgHuUR.d.mts → file-format-Dbmn5hhd.d.mts} +22 -0
- package/dist/index.d.mts +28 -4
- package/dist/index.mjs +1 -1
- package/dist/{keyring-preference-BgjU5DM9.d.mts → keyring-preference-CeP6MLyb.d.mts} +25 -2
- package/dist/metafile-esm.json +1 -1
- package/dist/wrangler/index.d.mts +2 -2
- package/dist/wrangler/index.mjs +6 -3
- package/package.json +2 -2
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { l as OAuthConsentPages, F as FileFormat, b as OAuthFlowContext, C as CredentialStore, d as LoginOrRefreshResult, U as UserAuthConfig } from './file-format-
|
|
1
|
+
import { l as OAuthConsentPages, F as FileFormat, b as OAuthFlowContext, C as CredentialStore, d as LoginOrRefreshResult, U as UserAuthConfig } from './file-format-Dbmn5hhd.mjs';
|
|
2
2
|
import { ApiCredentials, ComplianceConfig } from '@cloudflare/workers-utils';
|
|
3
3
|
|
|
4
4
|
/** Minimal shape of the interactive `select` prompt's options for account selection. */
|
|
@@ -42,13 +42,29 @@ interface AuthContext {
|
|
|
42
42
|
* rather than a fork of the factory.
|
|
43
43
|
*/
|
|
44
44
|
interface CliDescriptor {
|
|
45
|
-
/**
|
|
45
|
+
/**
|
|
46
|
+
* The CLI's invocation name, used for keyring install-dir scoping and in
|
|
47
|
+
* messaging that refers to the executable (e.g. `"wrangler"`, `"cf"`).
|
|
48
|
+
*/
|
|
46
49
|
cliName: string;
|
|
50
|
+
/**
|
|
51
|
+
* The CLI's branded name, used in prose addressed to the user (e.g.
|
|
52
|
+
* `"Wrangler"` for wrangler, `"cf"` for cf). Distinct from
|
|
53
|
+
* {@link CliDescriptor.cliName}, which names the executable.
|
|
54
|
+
*/
|
|
55
|
+
displayName: string;
|
|
47
56
|
/** Commands surfaced in auth guidance. */
|
|
48
57
|
commands: {
|
|
49
58
|
login: string;
|
|
50
59
|
whoami: string;
|
|
51
60
|
createProfile: string;
|
|
61
|
+
/**
|
|
62
|
+
* The command that restarts the OAuth 2.0 Device Authorization Grant,
|
|
63
|
+
* surfaced when a device code is denied, expires, or times out. Spelled
|
|
64
|
+
* out per CLI rather than derived from {@link CliDescriptor.commands.login}
|
|
65
|
+
* so the flag name stays the CLI's business.
|
|
66
|
+
*/
|
|
67
|
+
deviceLogin: string;
|
|
52
68
|
};
|
|
53
69
|
/**
|
|
54
70
|
* OS-keyring service identifier. Becomes the `-s` arg to macOS `security`,
|
|
@@ -110,6 +126,13 @@ interface CloudflareLoginProps {
|
|
|
110
126
|
callbackHost?: string;
|
|
111
127
|
callbackPort?: number;
|
|
112
128
|
profile?: string;
|
|
129
|
+
/**
|
|
130
|
+
* When `true`, authenticate using the OAuth 2.0 Device Authorization Grant
|
|
131
|
+
* (RFC 8628) instead of the authorization-code-with-PKCE callback flow. The
|
|
132
|
+
* device flow does not start a local callback server, so `callbackHost` and
|
|
133
|
+
* `callbackPort` are ignored when this is set.
|
|
134
|
+
*/
|
|
135
|
+
device?: boolean;
|
|
113
136
|
}
|
|
114
137
|
/** A Cloudflare CLI's auth layer, returned by {@link createCloudflareAuth}. */
|
|
115
138
|
interface CloudflareAuth {
|