@cloudflare/workers-auth 0.8.0 → 0.9.1
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 +8 -5
- package/dist/cf/index.mjs +18 -95
- package/dist/{chunk-T63LVVAX.mjs → chunk-3U6VZT7T.mjs} +3 -3
- package/dist/{chunk-LQW53VED.mjs → chunk-XLADBZ7F.mjs} +528 -462
- package/dist/{file-format-Bpmgm2Po.d.mts → file-format-Dlt3H3sW.d.mts} +6 -2
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +1 -1
- package/dist/{keyring-preference-CWjI7ct9.d.mts → keyring-preference-B8dU564W.d.mts} +2 -2
- package/dist/metafile-esm.json +1 -1
- package/dist/wrangler/index.d.mts +2 -2
- package/dist/wrangler/index.mjs +2 -2
- package/package.json +3 -3
|
@@ -106,6 +106,10 @@ interface OAuthFlowTemporaryContext {
|
|
|
106
106
|
*/
|
|
107
107
|
prompt: (question: string, notice: string) => Promise<boolean>;
|
|
108
108
|
}
|
|
109
|
+
/** Optional provisioning inputs for a newly-created temporary account. */
|
|
110
|
+
interface TemporaryAccountRequest {
|
|
111
|
+
eventCode?: string;
|
|
112
|
+
}
|
|
109
113
|
/**
|
|
110
114
|
* The branded OAuth consent pages the provider redirects the browser to after
|
|
111
115
|
* the user grants or denies consent.
|
|
@@ -379,7 +383,7 @@ interface OAuthFlowAPI {
|
|
|
379
383
|
* process (e.g. in tests) — each invocation starts a fresh temporary session.
|
|
380
384
|
* No-op when the flow was created without a `temporary` context.
|
|
381
385
|
*/
|
|
382
|
-
setTemporaryAllowed(allowed: boolean): void;
|
|
386
|
+
setTemporaryAllowed(allowed: boolean, request?: TemporaryAccountRequest): void;
|
|
383
387
|
/**
|
|
384
388
|
* Whether `--temporary` is permitted for this invocation (see
|
|
385
389
|
* {@link setTemporaryAllowed}). Always `false` without a `temporary` context.
|
|
@@ -491,4 +495,4 @@ interface CredentialStore extends AuthConfigStorage {
|
|
|
491
495
|
*/
|
|
492
496
|
type FileFormat = "toml" | "json";
|
|
493
497
|
|
|
494
|
-
export { type AuthConfigStorage as A, type CredentialStore as C, type DeactivateDirectoryResult as D, type FileFormat as F, type LoginOrRefreshFailureReason as L, type OAuthFlowLogger as O, type ProfileConfigOperations as P, type
|
|
498
|
+
export { type AuthConfigStorage as A, type CredentialStore as C, type DeactivateDirectoryResult as D, type FileFormat as F, type LoginOrRefreshFailureReason as L, type OAuthFlowLogger as O, type ProfileConfigOperations as P, type TemporaryAccountRequest as T, type UserAuthConfig as U, type ConfigStorage as a, type DirectoryBindingOperations as b, type DirectoryBindingsStorage as c, type LoginOrRefreshResult as d, type LoginProps as e, type OAuthFlowContext as f, type ProfileStore as g, type TemporaryPreviewAccount as h, createOAuthFlow as i, createProfileStore as j, generateAuthUrl as k, generateRandomState as l, type OAuthConsentPages as m, validateProfileName as v };
|
package/dist/index.d.mts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { O as OAuthFlowLogger, U as UserAuthConfig, A as AuthConfigStorage, C as CredentialStore, F as FileFormat } from './file-format-
|
|
2
|
-
export { a as ConfigStorage, D as DeactivateDirectoryResult, b as DirectoryBindingOperations, c as DirectoryBindingsStorage, L as LoginOrRefreshFailureReason, d as LoginOrRefreshResult, e as LoginProps, f as OAuthFlowContext, P as ProfileConfigOperations, g as ProfileStore, T as
|
|
1
|
+
import { O as OAuthFlowLogger, U as UserAuthConfig, A as AuthConfigStorage, C as CredentialStore, F as FileFormat } from './file-format-Dlt3H3sW.mjs';
|
|
2
|
+
export { a as ConfigStorage, D as DeactivateDirectoryResult, b as DirectoryBindingOperations, c as DirectoryBindingsStorage, L as LoginOrRefreshFailureReason, d as LoginOrRefreshResult, e as LoginProps, f as OAuthFlowContext, P as ProfileConfigOperations, g as ProfileStore, T as TemporaryAccountRequest, h as TemporaryPreviewAccount, i as createOAuthFlow, j as createProfileStore, k as generateAuthUrl, l as generateRandomState, v as validateProfileName } from './file-format-Dlt3H3sW.mjs';
|
|
3
3
|
import { ApiCredentials } from '@cloudflare/workers-utils';
|
|
4
4
|
import { SpawnSyncReturns } from 'node:child_process';
|
|
5
5
|
|
package/dist/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export { EncryptedFileCredentialStore, FileCredentialStore, LinuxSecretToolKeyProvider, MacSecurityKeyProvider, NapiKeyringKeyProvider, PINNED_KEYRING_VERSION, PKCE_CHARSET, TEMPORARY_TERMS_NOTICE, TEMPORARY_TERMS_PROMPT, clearAccessCaches, clearCredentialStorageState, createCredentialStorageContext, createOAuthFlow, createProfileStore, decryptString, domainUsesAccess, encryptString, findKeyringBinding, generateAuthUrl, generateKey, generateRandomState, generateVerificationUrl, getAccessHeaders, getAuthConfigFilePath, getAuthFromEnv, getAuthUrlFromEnv, getCloudflareAPITokenFromEnv, getCloudflareAccountIdFromEnv, getCloudflareAuthUseKeyringFromEnv, getCloudflareGlobalAuthEmailFromEnv, getCloudflareGlobalAuthKeyFromEnv, getEncryptedAuthConfigFilePath, getKeyringAccountName, getKeyringInstallDir, installKeyringBindingSync, parseEncryptedEnvelope, probeSecretTool, readStoredAuthState, resetCredentialStorageState, resolveKeyProvider, scrubEncryptedCredentials, setKeyProviderFactoryForTesting, setKeyringEntryFactory, setLinuxSecretToolRunner, setMacSecurityCommandRunner, setNpmRunner, validateProfileName } from './chunk-
|
|
1
|
+
export { EncryptedFileCredentialStore, FileCredentialStore, LinuxSecretToolKeyProvider, MacSecurityKeyProvider, NapiKeyringKeyProvider, PINNED_KEYRING_VERSION, PKCE_CHARSET, TEMPORARY_TERMS_NOTICE, TEMPORARY_TERMS_PROMPT, clearAccessCaches, clearCredentialStorageState, createCredentialStorageContext, createOAuthFlow, createProfileStore, decryptString, domainUsesAccess, encryptString, findKeyringBinding, generateAuthUrl, generateKey, generateRandomState, generateVerificationUrl, getAccessHeaders, getAuthConfigFilePath, getAuthFromEnv, getAuthUrlFromEnv, getCloudflareAPITokenFromEnv, getCloudflareAccountIdFromEnv, getCloudflareAuthUseKeyringFromEnv, getCloudflareGlobalAuthEmailFromEnv, getCloudflareGlobalAuthKeyFromEnv, getEncryptedAuthConfigFilePath, getKeyringAccountName, getKeyringInstallDir, installKeyringBindingSync, parseEncryptedEnvelope, probeSecretTool, readStoredAuthState, resetCredentialStorageState, resolveKeyProvider, scrubEncryptedCredentials, setKeyProviderFactoryForTesting, setKeyringEntryFactory, setLinuxSecretToolRunner, setMacSecurityCommandRunner, setNpmRunner, validateProfileName } from './chunk-XLADBZ7F.mjs';
|
|
2
2
|
import './chunk-O6YSETKJ.mjs';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { f as OAuthFlowContext,
|
|
1
|
+
import { f as OAuthFlowContext, m as OAuthConsentPages, F as FileFormat, C as CredentialStore, T as TemporaryAccountRequest, d as LoginOrRefreshResult, U as UserAuthConfig } from './file-format-Dlt3H3sW.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. */
|
|
@@ -148,7 +148,7 @@ interface CloudflareAuth {
|
|
|
148
148
|
/** The currently-active credential store for the active profile. */
|
|
149
149
|
getCredentialStore: () => CredentialStore;
|
|
150
150
|
/** Mark whether `--temporary` is permitted for the current invocation. */
|
|
151
|
-
setTemporaryAllowed: (allowed: boolean) => void;
|
|
151
|
+
setTemporaryAllowed: (allowed: boolean, request?: TemporaryAccountRequest) => void;
|
|
152
152
|
/** Resolve API credentials (env / temporary account / stored OAuth token). */
|
|
153
153
|
getAPIToken: () => ApiCredentials | undefined;
|
|
154
154
|
/** Throw an error if there is no API token available. */
|