@effect-auth/core 0.1.0-alpha.1 → 0.1.0-alpha.13
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/README.md +790 -73
- package/dist/ApiKey.d.ts +207 -0
- package/dist/ApiKey.d.ts.map +1 -0
- package/dist/ApiKey.js +275 -0
- package/dist/ApiKey.js.map +1 -0
- package/dist/AuditLog.d.ts +335 -1
- package/dist/AuditLog.d.ts.map +1 -1
- package/dist/AuditLog.js +318 -1
- package/dist/AuditLog.js.map +1 -1
- package/dist/AuthConfig.d.ts +42 -0
- package/dist/AuthConfig.d.ts.map +1 -0
- package/dist/AuthConfig.js +43 -0
- package/dist/AuthConfig.js.map +1 -0
- package/dist/AuthFlow.d.ts +462 -36
- package/dist/AuthFlow.d.ts.map +1 -1
- package/dist/AuthFlow.js +657 -5
- package/dist/AuthFlow.js.map +1 -1
- package/dist/AuthKernel.d.ts +3 -0
- package/dist/AuthKernel.d.ts.map +1 -0
- package/dist/AuthKernel.js +9 -0
- package/dist/AuthKernel.js.map +1 -0
- package/dist/Challenge.d.ts +24 -4
- package/dist/Challenge.d.ts.map +1 -1
- package/dist/Challenge.js +167 -1
- package/dist/Challenge.js.map +1 -1
- package/dist/Client.d.ts +449 -0
- package/dist/Client.d.ts.map +1 -0
- package/dist/Client.js +985 -0
- package/dist/Client.js.map +1 -0
- package/dist/Crypto.d.ts +6 -1
- package/dist/Crypto.d.ts.map +1 -1
- package/dist/Crypto.js +62 -1
- package/dist/Crypto.js.map +1 -1
- package/dist/DomainVerification.d.ts +200 -0
- package/dist/DomainVerification.d.ts.map +1 -0
- package/dist/DomainVerification.js +304 -0
- package/dist/DomainVerification.js.map +1 -0
- package/dist/EffectQbSqliteStorage.d.ts +985 -0
- package/dist/EffectQbSqliteStorage.d.ts.map +1 -0
- package/dist/EffectQbSqliteStorage.js +2824 -0
- package/dist/EffectQbSqliteStorage.js.map +1 -0
- package/dist/EmailOtp.d.ts +120 -0
- package/dist/EmailOtp.d.ts.map +1 -0
- package/dist/EmailOtp.js +286 -0
- package/dist/EmailOtp.js.map +1 -0
- package/dist/EmailVerification.d.ts +121 -0
- package/dist/EmailVerification.d.ts.map +1 -0
- package/dist/EmailVerification.js +200 -0
- package/dist/EmailVerification.js.map +1 -0
- package/dist/HttpApi/Api.d.ts +2410 -0
- package/dist/HttpApi/Api.d.ts.map +1 -0
- package/dist/HttpApi/Api.js +3026 -0
- package/dist/HttpApi/Api.js.map +1 -0
- package/dist/HttpApi/Endpoints.d.ts +1073 -0
- package/dist/HttpApi/Endpoints.d.ts.map +1 -0
- package/dist/HttpApi/Endpoints.js +428 -0
- package/dist/HttpApi/Endpoints.js.map +1 -0
- package/dist/HttpApi/Errors.d.ts +114 -0
- package/dist/HttpApi/Errors.d.ts.map +1 -0
- package/dist/HttpApi/Errors.js +230 -0
- package/dist/HttpApi/Errors.js.map +1 -0
- package/dist/HttpApi/Schemas.d.ts +1254 -0
- package/dist/HttpApi/Schemas.d.ts.map +1 -0
- package/dist/HttpApi/Schemas.js +862 -0
- package/dist/HttpApi/Schemas.js.map +1 -0
- package/dist/HttpApi/Security.d.ts +159 -0
- package/dist/HttpApi/Security.d.ts.map +1 -0
- package/dist/HttpApi/Security.js +530 -0
- package/dist/HttpApi/Security.js.map +1 -0
- package/dist/HttpApi/Transport.d.ts +65 -0
- package/dist/HttpApi/Transport.d.ts.map +1 -0
- package/dist/HttpApi/Transport.js +311 -0
- package/dist/HttpApi/Transport.js.map +1 -0
- package/dist/HttpApi/index.d.ts +8 -0
- package/dist/HttpApi/index.d.ts.map +1 -0
- package/dist/HttpApi/index.js +7 -0
- package/dist/HttpApi/index.js.map +1 -0
- package/dist/HttpApi.d.ts +2 -0
- package/dist/HttpApi.d.ts.map +1 -0
- package/dist/HttpApi.js +2 -0
- package/dist/HttpApi.js.map +1 -0
- package/dist/Identifiers.d.ts +3 -0
- package/dist/Identifiers.d.ts.map +1 -1
- package/dist/Identifiers.js +2 -0
- package/dist/Identifiers.js.map +1 -1
- package/dist/IncidentAction.d.ts +80 -0
- package/dist/IncidentAction.d.ts.map +1 -0
- package/dist/IncidentAction.js +158 -0
- package/dist/IncidentAction.js.map +1 -0
- package/dist/Internal.d.ts +7 -0
- package/dist/Internal.d.ts.map +1 -0
- package/dist/Internal.js +12 -0
- package/dist/Internal.js.map +1 -0
- package/dist/Jwt.d.ts +281 -0
- package/dist/Jwt.d.ts.map +1 -0
- package/dist/Jwt.js +721 -0
- package/dist/Jwt.js.map +1 -0
- package/dist/LoginApproval.d.ts +314 -0
- package/dist/LoginApproval.d.ts.map +1 -0
- package/dist/LoginApproval.js +551 -0
- package/dist/LoginApproval.js.map +1 -0
- package/dist/LoginNotification.d.ts +183 -0
- package/dist/LoginNotification.d.ts.map +1 -0
- package/dist/LoginNotification.js +329 -0
- package/dist/LoginNotification.js.map +1 -0
- package/dist/LoginRisk.d.ts +344 -0
- package/dist/LoginRisk.d.ts.map +1 -0
- package/dist/LoginRisk.js +484 -0
- package/dist/LoginRisk.js.map +1 -0
- package/dist/MachineAuth.d.ts +73 -0
- package/dist/MachineAuth.d.ts.map +1 -0
- package/dist/MachineAuth.js +147 -0
- package/dist/MachineAuth.js.map +1 -0
- package/dist/MagicLink.d.ts +85 -0
- package/dist/MagicLink.d.ts.map +1 -0
- package/dist/MagicLink.js +206 -0
- package/dist/MagicLink.js.map +1 -0
- package/dist/Mailer.d.ts +147 -0
- package/dist/Mailer.d.ts.map +1 -0
- package/dist/Mailer.js +208 -0
- package/dist/Mailer.js.map +1 -0
- package/dist/OAuth.d.ts +1890 -0
- package/dist/OAuth.d.ts.map +1 -0
- package/dist/OAuth.js +3063 -0
- package/dist/OAuth.js.map +1 -0
- package/dist/Passkey.d.ts +334 -0
- package/dist/Passkey.d.ts.map +1 -0
- package/dist/Passkey.js +422 -0
- package/dist/Passkey.js.map +1 -0
- package/dist/PasskeySimpleWebAuthn.d.ts +11 -0
- package/dist/PasskeySimpleWebAuthn.d.ts.map +1 -0
- package/dist/PasskeySimpleWebAuthn.js +181 -0
- package/dist/PasskeySimpleWebAuthn.js.map +1 -0
- package/dist/Password.d.ts +237 -0
- package/dist/Password.d.ts.map +1 -0
- package/dist/Password.js +641 -0
- package/dist/Password.js.map +1 -0
- package/dist/Policy.d.ts +7 -4
- package/dist/Policy.d.ts.map +1 -1
- package/dist/Policy.js +28 -5
- package/dist/Policy.js.map +1 -1
- package/dist/Privacy.d.ts +15 -0
- package/dist/Privacy.d.ts.map +1 -1
- package/dist/Privacy.js +58 -1
- package/dist/Privacy.js.map +1 -1
- package/dist/RateLimiter.d.ts +104 -0
- package/dist/RateLimiter.d.ts.map +1 -0
- package/dist/RateLimiter.js +118 -0
- package/dist/RateLimiter.js.map +1 -0
- package/dist/RecoveryCode.d.ts +169 -0
- package/dist/RecoveryCode.d.ts.map +1 -0
- package/dist/RecoveryCode.js +299 -0
- package/dist/RecoveryCode.js.map +1 -0
- package/dist/RefreshToken.d.ts +222 -0
- package/dist/RefreshToken.d.ts.map +1 -0
- package/dist/RefreshToken.js +342 -0
- package/dist/RefreshToken.js.map +1 -0
- package/dist/Retention.d.ts +98 -0
- package/dist/Retention.d.ts.map +1 -0
- package/dist/Retention.js +204 -0
- package/dist/Retention.js.map +1 -0
- package/dist/SecurityTimeline.d.ts +78 -0
- package/dist/SecurityTimeline.d.ts.map +1 -0
- package/dist/SecurityTimeline.js +461 -0
- package/dist/SecurityTimeline.js.map +1 -0
- package/dist/Sessions.d.ts +123 -11
- package/dist/Sessions.d.ts.map +1 -1
- package/dist/Sessions.js +534 -1
- package/dist/Sessions.js.map +1 -1
- package/dist/StepUp.d.ts +44 -0
- package/dist/StepUp.d.ts.map +1 -0
- package/dist/StepUp.js +82 -0
- package/dist/StepUp.js.map +1 -0
- package/dist/Storage.d.ts +73 -5
- package/dist/Storage.d.ts.map +1 -1
- package/dist/Storage.js +11 -1
- package/dist/Storage.js.map +1 -1
- package/dist/StorageMigrations.d.ts +23 -1
- package/dist/StorageMigrations.d.ts.map +1 -1
- package/dist/StorageMigrations.js +462 -2
- package/dist/StorageMigrations.js.map +1 -1
- package/dist/Testing.d.ts +9 -1
- package/dist/Testing.d.ts.map +1 -1
- package/dist/Testing.js +30 -2
- package/dist/Testing.js.map +1 -1
- package/dist/Totp.d.ts +220 -0
- package/dist/Totp.d.ts.map +1 -0
- package/dist/Totp.js +477 -0
- package/dist/Totp.js.map +1 -0
- package/dist/TrustedDevice.d.ts +127 -0
- package/dist/TrustedDevice.d.ts.map +1 -0
- package/dist/TrustedDevice.js +252 -0
- package/dist/TrustedDevice.js.map +1 -0
- package/dist/WaitUntil.d.ts.map +1 -1
- package/dist/WaitUntil.js +1 -1
- package/dist/WaitUntil.js.map +1 -1
- package/dist/Webhook.d.ts +380 -0
- package/dist/Webhook.d.ts.map +1 -0
- package/dist/Webhook.js +592 -0
- package/dist/Webhook.js.map +1 -0
- package/dist/alchemy/cloudflare/Email.d.ts +25 -0
- package/dist/alchemy/cloudflare/Email.d.ts.map +1 -0
- package/dist/alchemy/cloudflare/Email.js +117 -0
- package/dist/alchemy/cloudflare/Email.js.map +1 -0
- package/dist/alchemy/cloudflare/RateLimitDurableObject.d.ts +34 -0
- package/dist/alchemy/cloudflare/RateLimitDurableObject.d.ts.map +1 -0
- package/dist/alchemy/cloudflare/RateLimitDurableObject.js +30 -0
- package/dist/alchemy/cloudflare/RateLimitDurableObject.js.map +1 -0
- package/dist/cloudflare/Email.d.ts +25 -0
- package/dist/cloudflare/Email.d.ts.map +1 -0
- package/dist/cloudflare/Email.js +153 -0
- package/dist/cloudflare/Email.js.map +1 -0
- package/dist/cloudflare/RateLimitDurableObject.d.ts +50 -0
- package/dist/cloudflare/RateLimitDurableObject.d.ts.map +1 -0
- package/dist/cloudflare/RateLimitDurableObject.js +51 -0
- package/dist/cloudflare/RateLimitDurableObject.js.map +1 -0
- package/dist/index.d.ts +25 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +25 -0
- package/dist/index.js.map +1 -1
- package/dist/internal/RateLimitDurableObject.d.ts +32 -0
- package/dist/internal/RateLimitDurableObject.d.ts.map +1 -0
- package/dist/internal/RateLimitDurableObject.js +80 -0
- package/dist/internal/RateLimitDurableObject.js.map +1 -0
- package/migrations/0002_auth_password.sql +25 -0
- package/migrations/0003_auth_login_approval_review.sql +22 -0
- package/migrations/0004_auth_trusted_device.sql +12 -0
- package/migrations/0005_auth_passkey.sql +17 -0
- package/migrations/0006_auth_totp_factor.sql +17 -0
- package/migrations/0007_auth_recovery_code.sql +13 -0
- package/migrations/0008_auth_api_key.sql +17 -0
- package/migrations/0009_auth_refresh_token.sql +21 -0
- package/migrations/0010_auth_jwt_revocation.sql +8 -0
- package/migrations/0011_auth_oauth_account.sql +16 -0
- package/migrations/0012_auth_oauth_provider_token_vault.sql +20 -0
- package/migrations/0013_auth_security_timeline.sql +16 -0
- package/migrations/0014_auth_webhook_outbox.sql +16 -0
- package/migrations/0015_auth_webhook_replay.sql +7 -0
- package/migrations/0016_auth_login_risk_history.sql +23 -0
- package/migrations/0017_auth_audit_log.sql +17 -0
- package/migrations/0018_auth_domain_verification.sql +18 -0
- package/migrations/0019_auth_oauth_authorization_code.sql +17 -0
- package/migrations/0020_auth_oauth_provider_mode_token.sql +24 -0
- package/migrations/0021_auth_oauth_client_secret.sql +14 -0
- package/migrations/0022_auth_oauth_client.sql +15 -0
- package/migrations/0023_auth_oauth_consent.sql +15 -0
- package/package.json +162 -26
- package/dist/D1Kysely.d.ts +0 -40
- package/dist/D1Kysely.d.ts.map +0 -1
- package/dist/D1Kysely.js +0 -75
- package/dist/D1Kysely.js.map +0 -1
- package/dist/KyselyStorage.d.ts +0 -41
- package/dist/KyselyStorage.d.ts.map +0 -1
- package/dist/KyselyStorage.js +0 -176
- package/dist/KyselyStorage.js.map +0 -1
package/dist/OAuth.d.ts
ADDED
|
@@ -0,0 +1,1890 @@
|
|
|
1
|
+
import { Brand, Context, Duration, Effect, Layer, Redacted } from "effect";
|
|
2
|
+
import type * as OptionTypes from "effect/Option";
|
|
3
|
+
import { Challenge } from "./Challenge.js";
|
|
4
|
+
import type { ChallengeService } from "./Challenge.js";
|
|
5
|
+
import { Crypto } from "./Crypto.js";
|
|
6
|
+
import type { CryptoService } from "./Crypto.js";
|
|
7
|
+
import { ChallengeId, Email, OAuthAccountId, OAuthClientId, OAuthProviderId, UnixMillis, UserId } from "./Identifiers.js";
|
|
8
|
+
import { JwtError, JwtVerifier, type JwksDocument, type JwtAudience, type JwtAlgorithm, type JwtClaims, type JwtHeader, type JwtKeyInfo, type JwtKeysService, type JwtVerifierService, type JwtVerificationFailureReason } from "./Jwt.js";
|
|
9
|
+
export type OAuthStateToken = Brand.Branded<string, "auth/OAuthStateToken">;
|
|
10
|
+
export declare const OAuthStateToken: Brand.Constructor<OAuthStateToken>;
|
|
11
|
+
export type OAuthCodeVerifier = Brand.Branded<string, "auth/OAuthCodeVerifier">;
|
|
12
|
+
export declare const OAuthCodeVerifier: Brand.Constructor<OAuthCodeVerifier>;
|
|
13
|
+
export type OAuthCodeChallenge = Brand.Branded<string, "auth/OAuthCodeChallenge">;
|
|
14
|
+
export declare const OAuthCodeChallenge: Brand.Constructor<OAuthCodeChallenge>;
|
|
15
|
+
export type OAuthNonce = Brand.Branded<string, "auth/OAuthNonce">;
|
|
16
|
+
export declare const OAuthNonce: Brand.Constructor<OAuthNonce>;
|
|
17
|
+
export type OAuthAuthorizationCode = Brand.Branded<string, "auth/OAuthAuthorizationCode">;
|
|
18
|
+
export declare const OAuthAuthorizationCode: Brand.Constructor<OAuthAuthorizationCode>;
|
|
19
|
+
export type OAuthAccessToken = Brand.Branded<string, "auth/OAuthAccessToken">;
|
|
20
|
+
export declare const OAuthAccessToken: Brand.Constructor<OAuthAccessToken>;
|
|
21
|
+
export type OAuthRefreshToken = Brand.Branded<string, "auth/OAuthRefreshToken">;
|
|
22
|
+
export declare const OAuthRefreshToken: Brand.Constructor<OAuthRefreshToken>;
|
|
23
|
+
export type OAuthIdToken = Brand.Branded<string, "auth/OAuthIdToken">;
|
|
24
|
+
export declare const OAuthIdToken: Brand.Constructor<OAuthIdToken>;
|
|
25
|
+
export declare const defaultOAuthStateTtl: Duration.Duration;
|
|
26
|
+
export declare const defaultOAuthLinkConfirmationTtl: Duration.Duration;
|
|
27
|
+
export declare const defaultOAuthJwksCacheTtl: Duration.Duration;
|
|
28
|
+
export declare const defaultOAuthStateSecretBytes = 32;
|
|
29
|
+
export declare const defaultOAuthCodeVerifierBytes = 32;
|
|
30
|
+
export declare const defaultOAuthAuthorizationCodeBytes = 32;
|
|
31
|
+
export declare const defaultOAuthAuthorizationCodeTtl: Duration.Duration;
|
|
32
|
+
export declare const defaultOAuthLinkConfirmationSecretBytes = 32;
|
|
33
|
+
export declare const defaultOAuthNonceBytes = 16;
|
|
34
|
+
export declare const defaultOAuthProviderModeAccessTokenBytes = 32;
|
|
35
|
+
export declare const defaultOAuthProviderModeRefreshTokenBytes = 32;
|
|
36
|
+
export declare const defaultOAuthProviderModeAccessTokenTtl: Duration.Duration;
|
|
37
|
+
export declare const defaultOAuthProviderModeRefreshTokenTtl: Duration.Duration;
|
|
38
|
+
export declare const appleSignInProviderId: OAuthProviderId;
|
|
39
|
+
export declare const appleSignInIssuer = "https://appleid.apple.com";
|
|
40
|
+
export declare const appleSignInAuthorizationEndpoint = "https://appleid.apple.com/auth/authorize";
|
|
41
|
+
export declare const appleSignInTokenEndpoint = "https://appleid.apple.com/auth/token";
|
|
42
|
+
export declare const appleSignInRevocationEndpoint = "https://appleid.apple.com/auth/revoke";
|
|
43
|
+
export declare const appleSignInJwksUri = "https://appleid.apple.com/auth/keys";
|
|
44
|
+
export declare const appleSignInPrivateRelayDomain = "privaterelay.appleid.com";
|
|
45
|
+
export declare const appleSignInDefaultScopes: readonly ["openid", "email", "name"];
|
|
46
|
+
export declare const appleSignInDefaultAuthorizationParams: {
|
|
47
|
+
readonly response_mode: "form_post";
|
|
48
|
+
};
|
|
49
|
+
export declare const githubOAuthProviderId: OAuthProviderId;
|
|
50
|
+
export declare const githubOAuthAuthorizationEndpoint = "https://github.com/login/oauth/authorize";
|
|
51
|
+
export declare const githubOAuthTokenEndpoint = "https://github.com/login/oauth/access_token";
|
|
52
|
+
export declare const githubOAuthUserEndpoint = "https://api.github.com/user";
|
|
53
|
+
export declare const githubOAuthEmailsEndpoint = "https://api.github.com/user/emails";
|
|
54
|
+
export declare const githubOAuthDefaultScopes: readonly ["read:user", "user:email"];
|
|
55
|
+
export declare const githubOAuthApiVersion = "2022-11-28";
|
|
56
|
+
export declare const githubOAuthApiVersionHeader: {
|
|
57
|
+
readonly "x-github-api-version": "2022-11-28";
|
|
58
|
+
};
|
|
59
|
+
export declare const googleOidcProviderId: OAuthProviderId;
|
|
60
|
+
export declare const googleOidcIssuer = "https://accounts.google.com";
|
|
61
|
+
export declare const googleOidcAuthorizationEndpoint = "https://accounts.google.com/o/oauth2/v2/auth";
|
|
62
|
+
export declare const googleOidcTokenEndpoint = "https://oauth2.googleapis.com/token";
|
|
63
|
+
export declare const googleOidcRevocationEndpoint = "https://oauth2.googleapis.com/revoke";
|
|
64
|
+
export declare const googleOidcUserInfoEndpoint = "https://openidconnect.googleapis.com/v1/userinfo";
|
|
65
|
+
export declare const googleOidcJwksUri = "https://www.googleapis.com/oauth2/v3/certs";
|
|
66
|
+
export declare const googleOidcDefaultScopes: readonly ["openid", "email", "profile"];
|
|
67
|
+
export declare const googleOidcOfflineAccessAuthorizationParams: {
|
|
68
|
+
readonly access_type: "offline";
|
|
69
|
+
readonly prompt: "consent";
|
|
70
|
+
};
|
|
71
|
+
export declare const microsoftOidcProviderId: OAuthProviderId;
|
|
72
|
+
export declare const microsoftOidcLoginBaseUrl = "https://login.microsoftonline.com";
|
|
73
|
+
export declare const microsoftOidcUserInfoEndpoint = "https://graph.microsoft.com/oidc/userinfo";
|
|
74
|
+
export declare const microsoftOidcDefaultScopes: readonly ["openid", "email", "profile"];
|
|
75
|
+
export declare const microsoftOidcOfflineAccessScopes: readonly ["openid", "email", "profile", "offline_access"];
|
|
76
|
+
export declare const genericOidcDefaultScopes: readonly ["openid", "email", "profile"];
|
|
77
|
+
export declare const microsoftOidcAuthorizationEndpoint: (tenant: string) => string;
|
|
78
|
+
export declare const microsoftOidcTokenEndpoint: (tenant: string) => string;
|
|
79
|
+
export declare const microsoftOidcJwksUri: (tenant: string) => string;
|
|
80
|
+
export declare const microsoftOidcIssuer: (tenant: string) => string;
|
|
81
|
+
export interface GoogleOidcProviderOptions {
|
|
82
|
+
readonly clientId: string;
|
|
83
|
+
readonly redirectUri: string;
|
|
84
|
+
readonly id?: OAuthProviderId;
|
|
85
|
+
readonly scopes?: readonly string[];
|
|
86
|
+
readonly authorizationParams?: Readonly<Record<string, string>>;
|
|
87
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
88
|
+
}
|
|
89
|
+
export interface GithubOAuthProviderOptions {
|
|
90
|
+
readonly clientId: string;
|
|
91
|
+
readonly redirectUri: string;
|
|
92
|
+
readonly id?: OAuthProviderId;
|
|
93
|
+
readonly scopes?: readonly string[];
|
|
94
|
+
readonly authorizationParams?: Readonly<Record<string, string>>;
|
|
95
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
96
|
+
}
|
|
97
|
+
export interface MicrosoftOidcProviderOptions {
|
|
98
|
+
readonly tenant: string;
|
|
99
|
+
readonly clientId: string;
|
|
100
|
+
readonly redirectUri: string;
|
|
101
|
+
readonly id?: OAuthProviderId;
|
|
102
|
+
readonly scopes?: readonly string[];
|
|
103
|
+
readonly authorizationParams?: Readonly<Record<string, string>>;
|
|
104
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
105
|
+
}
|
|
106
|
+
export interface AppleSignInProviderOptions {
|
|
107
|
+
readonly clientId: string;
|
|
108
|
+
readonly redirectUri: string;
|
|
109
|
+
readonly id?: OAuthProviderId;
|
|
110
|
+
readonly scopes?: readonly string[];
|
|
111
|
+
readonly authorizationParams?: Readonly<Record<string, string>>;
|
|
112
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
113
|
+
}
|
|
114
|
+
export interface GenericOidcProviderOptions {
|
|
115
|
+
readonly id: OAuthProviderId;
|
|
116
|
+
readonly issuer: string;
|
|
117
|
+
readonly clientId: string;
|
|
118
|
+
readonly authorizationEndpoint: string;
|
|
119
|
+
readonly tokenEndpoint: string;
|
|
120
|
+
readonly redirectUri: string;
|
|
121
|
+
readonly userInfoEndpoint?: string;
|
|
122
|
+
readonly jwksUri?: string;
|
|
123
|
+
readonly revocationEndpoint?: string;
|
|
124
|
+
readonly scopes?: readonly string[];
|
|
125
|
+
readonly authorizationParams?: Readonly<Record<string, string>>;
|
|
126
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
127
|
+
}
|
|
128
|
+
export interface AppleSignInAuthorizationUser {
|
|
129
|
+
readonly email?: string;
|
|
130
|
+
readonly name?: {
|
|
131
|
+
readonly firstName?: string;
|
|
132
|
+
readonly lastName?: string;
|
|
133
|
+
};
|
|
134
|
+
}
|
|
135
|
+
export interface GithubOAuthEmailRecord {
|
|
136
|
+
readonly email: string;
|
|
137
|
+
readonly primary?: boolean;
|
|
138
|
+
readonly verified?: boolean;
|
|
139
|
+
readonly visibility?: string | null;
|
|
140
|
+
}
|
|
141
|
+
export interface OAuthProviderConfig {
|
|
142
|
+
readonly id: OAuthProviderId;
|
|
143
|
+
readonly clientId: string;
|
|
144
|
+
readonly authorizationEndpoint: string;
|
|
145
|
+
readonly redirectUri: string;
|
|
146
|
+
readonly scopes?: readonly string[];
|
|
147
|
+
readonly authorizationParams?: Readonly<Record<string, string>>;
|
|
148
|
+
readonly issuer?: string;
|
|
149
|
+
readonly tokenEndpoint?: string;
|
|
150
|
+
readonly revocationEndpoint?: string;
|
|
151
|
+
readonly userInfoEndpoint?: string;
|
|
152
|
+
readonly jwksUri?: string;
|
|
153
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
154
|
+
}
|
|
155
|
+
export interface OAuthJwksFetchInput {
|
|
156
|
+
readonly provider: OAuthProviderConfig;
|
|
157
|
+
readonly url: string;
|
|
158
|
+
}
|
|
159
|
+
export interface OAuthJwksJwtKeysDependencies {
|
|
160
|
+
readonly provider: OAuthProviderConfig;
|
|
161
|
+
readonly fetch: (input: OAuthJwksFetchInput) => Effect.Effect<unknown, JwtError>;
|
|
162
|
+
readonly cacheTtl?: Duration.Duration;
|
|
163
|
+
readonly allowedAlgorithms?: readonly JwtAlgorithm[];
|
|
164
|
+
}
|
|
165
|
+
export type OAuthProviderOperation = "get";
|
|
166
|
+
declare const OAuthProviderError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
167
|
+
readonly _tag: "OAuthProviderError";
|
|
168
|
+
} & Readonly<A>;
|
|
169
|
+
export declare class OAuthProviderError extends OAuthProviderError_base<{
|
|
170
|
+
readonly operation: OAuthProviderOperation;
|
|
171
|
+
readonly message: string;
|
|
172
|
+
readonly cause?: unknown;
|
|
173
|
+
}> {
|
|
174
|
+
}
|
|
175
|
+
export interface OAuthProvidersService {
|
|
176
|
+
readonly get: (id: OAuthProviderId) => Effect.Effect<OptionTypes.Option<OAuthProviderConfig>, OAuthProviderError>;
|
|
177
|
+
}
|
|
178
|
+
export type OAuthClientType = "public" | "confidential";
|
|
179
|
+
export type OAuthClientStatus = "active" | "disabled";
|
|
180
|
+
export type OAuthClientGrantType = "authorization_code" | "refresh_token" | "client_credentials";
|
|
181
|
+
export type OAuthClientResponseType = "code";
|
|
182
|
+
export type OAuthClientSecretAuthenticationMethod = "client_secret_basic" | "client_secret_post";
|
|
183
|
+
export type OAuthClientSecretPrefix = Brand.Branded<string, "auth/OAuthClientSecretPrefix">;
|
|
184
|
+
export declare const OAuthClientSecretPrefix: Brand.Constructor<OAuthClientSecretPrefix>;
|
|
185
|
+
export type OAuthClientSecret = Brand.Branded<string, "auth/OAuthClientSecret">;
|
|
186
|
+
export declare const OAuthClientSecret: Brand.Constructor<OAuthClientSecret>;
|
|
187
|
+
export type OAuthClientSecretHash = Brand.Branded<string, "auth/OAuthClientSecretHash">;
|
|
188
|
+
export declare const OAuthClientSecretHash: Brand.Constructor<OAuthClientSecretHash>;
|
|
189
|
+
export declare const defaultOAuthClientSecretPrefixBytes = 8;
|
|
190
|
+
export declare const defaultOAuthClientSecretBytes = 32;
|
|
191
|
+
export interface OAuthClientRecord {
|
|
192
|
+
readonly id: OAuthClientId;
|
|
193
|
+
readonly type: OAuthClientType;
|
|
194
|
+
readonly status: OAuthClientStatus;
|
|
195
|
+
readonly name?: string;
|
|
196
|
+
readonly redirectUris: readonly string[];
|
|
197
|
+
readonly allowedGrantTypes: readonly OAuthClientGrantType[];
|
|
198
|
+
readonly allowedResponseTypes: readonly OAuthClientResponseType[];
|
|
199
|
+
readonly allowedScopes?: readonly string[];
|
|
200
|
+
readonly createdAt?: UnixMillis;
|
|
201
|
+
readonly updatedAt?: UnixMillis;
|
|
202
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
203
|
+
}
|
|
204
|
+
export interface OAuthClientLookupInput {
|
|
205
|
+
readonly clientId: OAuthClientId;
|
|
206
|
+
}
|
|
207
|
+
export interface OAuthClientRedirectUriValidationInput extends OAuthClientLookupInput {
|
|
208
|
+
readonly redirectUri: string;
|
|
209
|
+
readonly responseType?: OAuthClientResponseType;
|
|
210
|
+
readonly grantType?: OAuthClientGrantType;
|
|
211
|
+
}
|
|
212
|
+
export type OAuthClientRedirectUriValidationFailureReason = "unknown_client" | "disabled_client" | "unsupported_response_type" | "unsupported_grant_type" | "redirect_uri_mismatch";
|
|
213
|
+
export type OAuthClientRedirectUriValidationResult = {
|
|
214
|
+
readonly valid: true;
|
|
215
|
+
readonly client: OAuthClientRecord;
|
|
216
|
+
} | {
|
|
217
|
+
readonly valid: false;
|
|
218
|
+
readonly reason: OAuthClientRedirectUriValidationFailureReason;
|
|
219
|
+
};
|
|
220
|
+
export type OAuthClientRegistryOperation = "find" | "validate-redirect-uri";
|
|
221
|
+
declare const OAuthClientRegistryError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
222
|
+
readonly _tag: "OAuthClientRegistryError";
|
|
223
|
+
} & Readonly<A>;
|
|
224
|
+
export declare class OAuthClientRegistryError extends OAuthClientRegistryError_base<{
|
|
225
|
+
readonly operation: OAuthClientRegistryOperation;
|
|
226
|
+
readonly message: string;
|
|
227
|
+
readonly cause?: unknown;
|
|
228
|
+
}> {
|
|
229
|
+
}
|
|
230
|
+
export interface OAuthClientRegistryService {
|
|
231
|
+
readonly find: (input: OAuthClientLookupInput) => Effect.Effect<OptionTypes.Option<OAuthClientRecord>, OAuthClientRegistryError>;
|
|
232
|
+
readonly validateRedirectUri: (input: OAuthClientRedirectUriValidationInput) => Effect.Effect<OAuthClientRedirectUriValidationResult, OAuthClientRegistryError>;
|
|
233
|
+
}
|
|
234
|
+
declare const OAuthClientRegistry_base: Context.ServiceClass<OAuthClientRegistry, "auth/OAuthClientRegistry", OAuthClientRegistryService>;
|
|
235
|
+
export declare class OAuthClientRegistry extends OAuthClientRegistry_base {
|
|
236
|
+
}
|
|
237
|
+
export declare namespace OAuthClientRegistry {
|
|
238
|
+
const make: (service: OAuthClientRegistryService) => OAuthClientRegistryService;
|
|
239
|
+
}
|
|
240
|
+
export interface OAuthClientStoreListInput {
|
|
241
|
+
readonly includeDisabled?: boolean;
|
|
242
|
+
}
|
|
243
|
+
export type OAuthClientStoreOperation = "upsert" | "find" | "list" | "validate-redirect-uri";
|
|
244
|
+
declare const OAuthClientStoreError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
245
|
+
readonly _tag: "OAuthClientStoreError";
|
|
246
|
+
} & Readonly<A>;
|
|
247
|
+
export declare class OAuthClientStoreError extends OAuthClientStoreError_base<{
|
|
248
|
+
readonly operation: OAuthClientStoreOperation;
|
|
249
|
+
readonly message: string;
|
|
250
|
+
readonly cause?: unknown;
|
|
251
|
+
}> {
|
|
252
|
+
}
|
|
253
|
+
export interface OAuthClientStoreService {
|
|
254
|
+
readonly upsert: (record: OAuthClientRecord) => Effect.Effect<void, OAuthClientStoreError>;
|
|
255
|
+
readonly find: (input: OAuthClientLookupInput) => Effect.Effect<OptionTypes.Option<OAuthClientRecord>, OAuthClientStoreError>;
|
|
256
|
+
readonly list: (input?: OAuthClientStoreListInput) => Effect.Effect<readonly OAuthClientRecord[], OAuthClientStoreError>;
|
|
257
|
+
readonly validateRedirectUri: (input: OAuthClientRedirectUriValidationInput) => Effect.Effect<OAuthClientRedirectUriValidationResult, OAuthClientStoreError>;
|
|
258
|
+
}
|
|
259
|
+
declare const OAuthClientStore_base: Context.ServiceClass<OAuthClientStore, "auth/OAuthClientStore", OAuthClientStoreService>;
|
|
260
|
+
export declare class OAuthClientStore extends OAuthClientStore_base {
|
|
261
|
+
}
|
|
262
|
+
export declare namespace OAuthClientStore {
|
|
263
|
+
const make: (service: OAuthClientStoreService) => OAuthClientStoreService;
|
|
264
|
+
}
|
|
265
|
+
export interface OAuthConsentRecord {
|
|
266
|
+
readonly userId: UserId;
|
|
267
|
+
readonly clientId: OAuthClientId;
|
|
268
|
+
readonly scopes: readonly string[];
|
|
269
|
+
readonly grantedAt: UnixMillis;
|
|
270
|
+
readonly expiresAt?: UnixMillis;
|
|
271
|
+
readonly revokedAt?: UnixMillis;
|
|
272
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
273
|
+
}
|
|
274
|
+
export interface OAuthConsentFindActiveInput {
|
|
275
|
+
readonly userId: UserId;
|
|
276
|
+
readonly clientId: OAuthClientId;
|
|
277
|
+
readonly scopes?: readonly string[];
|
|
278
|
+
readonly now: UnixMillis;
|
|
279
|
+
}
|
|
280
|
+
export interface OAuthConsentListForUserInput {
|
|
281
|
+
readonly userId: UserId;
|
|
282
|
+
readonly now: UnixMillis;
|
|
283
|
+
readonly includeInactive?: boolean;
|
|
284
|
+
}
|
|
285
|
+
export interface OAuthConsentRevokeInput {
|
|
286
|
+
readonly userId: UserId;
|
|
287
|
+
readonly clientId: OAuthClientId;
|
|
288
|
+
readonly revokedAt: UnixMillis;
|
|
289
|
+
readonly reason?: string;
|
|
290
|
+
}
|
|
291
|
+
export interface OAuthConsentStoreDeleteInactiveCutoffs {
|
|
292
|
+
readonly beforeExpiresAt?: UnixMillis;
|
|
293
|
+
readonly beforeRevokedAt?: UnixMillis;
|
|
294
|
+
}
|
|
295
|
+
export type OAuthConsentStoreDeleteInactiveInput = (OAuthConsentStoreDeleteInactiveCutoffs & {
|
|
296
|
+
readonly beforeExpiresAt: UnixMillis;
|
|
297
|
+
}) | (OAuthConsentStoreDeleteInactiveCutoffs & {
|
|
298
|
+
readonly beforeRevokedAt: UnixMillis;
|
|
299
|
+
});
|
|
300
|
+
export type OAuthConsentStoreOperation = "upsert" | "find-active" | "list-for-user" | "revoke" | "deleteInactive";
|
|
301
|
+
declare const OAuthConsentStoreError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
302
|
+
readonly _tag: "OAuthConsentStoreError";
|
|
303
|
+
} & Readonly<A>;
|
|
304
|
+
export declare class OAuthConsentStoreError extends OAuthConsentStoreError_base<{
|
|
305
|
+
readonly operation: OAuthConsentStoreOperation;
|
|
306
|
+
readonly message: string;
|
|
307
|
+
readonly cause?: unknown;
|
|
308
|
+
}> {
|
|
309
|
+
}
|
|
310
|
+
export interface OAuthConsentStoreService {
|
|
311
|
+
readonly upsert: (record: OAuthConsentRecord) => Effect.Effect<void, OAuthConsentStoreError>;
|
|
312
|
+
readonly findActive: (input: OAuthConsentFindActiveInput) => Effect.Effect<OptionTypes.Option<OAuthConsentRecord>, OAuthConsentStoreError>;
|
|
313
|
+
readonly listForUser: (input: OAuthConsentListForUserInput) => Effect.Effect<readonly OAuthConsentRecord[], OAuthConsentStoreError>;
|
|
314
|
+
readonly revoke: (input: OAuthConsentRevokeInput) => Effect.Effect<OptionTypes.Option<OAuthConsentRecord>, OAuthConsentStoreError>;
|
|
315
|
+
readonly deleteInactive: (input: OAuthConsentStoreDeleteInactiveInput) => Effect.Effect<number, OAuthConsentStoreError>;
|
|
316
|
+
}
|
|
317
|
+
declare const OAuthConsentStore_base: Context.ServiceClass<OAuthConsentStore, "auth/OAuthConsentStore", OAuthConsentStoreService>;
|
|
318
|
+
export declare class OAuthConsentStore extends OAuthConsentStore_base {
|
|
319
|
+
}
|
|
320
|
+
export declare namespace OAuthConsentStore {
|
|
321
|
+
const make: (service: OAuthConsentStoreService) => OAuthConsentStoreService;
|
|
322
|
+
}
|
|
323
|
+
export type OAuthClientSecretOperation = "generate" | "parse" | "hash" | "verify";
|
|
324
|
+
declare const OAuthClientSecretError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
325
|
+
readonly _tag: "OAuthClientSecretError";
|
|
326
|
+
} & Readonly<A>;
|
|
327
|
+
export declare class OAuthClientSecretError extends OAuthClientSecretError_base<{
|
|
328
|
+
readonly operation: OAuthClientSecretOperation;
|
|
329
|
+
readonly message: string;
|
|
330
|
+
readonly cause?: unknown;
|
|
331
|
+
}> {
|
|
332
|
+
}
|
|
333
|
+
export interface OAuthClientSecretGenerateInput {
|
|
334
|
+
readonly prefixBytes?: number;
|
|
335
|
+
readonly secretBytes?: number;
|
|
336
|
+
}
|
|
337
|
+
export interface GeneratedOAuthClientSecret {
|
|
338
|
+
readonly prefix: OAuthClientSecretPrefix;
|
|
339
|
+
readonly secret: Redacted.Redacted<OAuthClientSecret>;
|
|
340
|
+
}
|
|
341
|
+
export interface OAuthClientSecretHashInput {
|
|
342
|
+
readonly secret: Redacted.Redacted<string>;
|
|
343
|
+
}
|
|
344
|
+
export interface OAuthClientSecretVerifyInput extends OAuthClientSecretHashInput {
|
|
345
|
+
readonly hash: OAuthClientSecretHash;
|
|
346
|
+
}
|
|
347
|
+
export interface OAuthClientSecretsService {
|
|
348
|
+
readonly generate: (input?: OAuthClientSecretGenerateInput) => Effect.Effect<GeneratedOAuthClientSecret, OAuthClientSecretError>;
|
|
349
|
+
readonly parse: (secret: Redacted.Redacted<string>) => Effect.Effect<OAuthClientSecretPrefix, OAuthClientSecretError>;
|
|
350
|
+
readonly hash: (input: OAuthClientSecretHashInput) => Effect.Effect<OAuthClientSecretHash, OAuthClientSecretError>;
|
|
351
|
+
readonly verify: (input: OAuthClientSecretVerifyInput) => Effect.Effect<boolean, OAuthClientSecretError>;
|
|
352
|
+
}
|
|
353
|
+
declare const OAuthClientSecrets_base: Context.ServiceClass<OAuthClientSecrets, "auth/OAuthClientSecrets", OAuthClientSecretsService>;
|
|
354
|
+
export declare class OAuthClientSecrets extends OAuthClientSecrets_base {
|
|
355
|
+
}
|
|
356
|
+
export declare namespace OAuthClientSecrets {
|
|
357
|
+
const make: (service: OAuthClientSecretsService) => OAuthClientSecretsService;
|
|
358
|
+
}
|
|
359
|
+
export interface OAuthClientSecretsDependencies {
|
|
360
|
+
readonly crypto: CryptoService;
|
|
361
|
+
}
|
|
362
|
+
export interface OAuthClientSecretRecord {
|
|
363
|
+
readonly clientId: OAuthClientId;
|
|
364
|
+
readonly prefix: OAuthClientSecretPrefix;
|
|
365
|
+
readonly secretHash: OAuthClientSecretHash;
|
|
366
|
+
readonly authenticationMethods: readonly OAuthClientSecretAuthenticationMethod[];
|
|
367
|
+
readonly createdAt: UnixMillis;
|
|
368
|
+
readonly expiresAt?: UnixMillis;
|
|
369
|
+
readonly lastUsedAt?: UnixMillis;
|
|
370
|
+
readonly revokedAt?: UnixMillis;
|
|
371
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
372
|
+
}
|
|
373
|
+
export interface OAuthClientSecretStoreLookupInput {
|
|
374
|
+
readonly clientId: OAuthClientId;
|
|
375
|
+
readonly prefix: OAuthClientSecretPrefix;
|
|
376
|
+
}
|
|
377
|
+
export interface OAuthClientSecretStoreMarkUsedInput extends OAuthClientSecretStoreLookupInput {
|
|
378
|
+
readonly lastUsedAt: UnixMillis;
|
|
379
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
380
|
+
}
|
|
381
|
+
export interface OAuthClientSecretStoreRevokeInput extends OAuthClientSecretStoreLookupInput {
|
|
382
|
+
readonly revokedAt: UnixMillis;
|
|
383
|
+
readonly reason?: string;
|
|
384
|
+
}
|
|
385
|
+
export type OAuthClientSecretStoreOperation = "upsert" | "find" | "mark-used" | "revoke";
|
|
386
|
+
declare const OAuthClientSecretStoreError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
387
|
+
readonly _tag: "OAuthClientSecretStoreError";
|
|
388
|
+
} & Readonly<A>;
|
|
389
|
+
export declare class OAuthClientSecretStoreError extends OAuthClientSecretStoreError_base<{
|
|
390
|
+
readonly operation: OAuthClientSecretStoreOperation;
|
|
391
|
+
readonly message: string;
|
|
392
|
+
readonly cause?: unknown;
|
|
393
|
+
}> {
|
|
394
|
+
}
|
|
395
|
+
export interface OAuthClientSecretStoreService {
|
|
396
|
+
readonly upsert: (record: OAuthClientSecretRecord) => Effect.Effect<void, OAuthClientSecretStoreError>;
|
|
397
|
+
readonly findByClientIdAndPrefix: (input: OAuthClientSecretStoreLookupInput) => Effect.Effect<OptionTypes.Option<OAuthClientSecretRecord>, OAuthClientSecretStoreError>;
|
|
398
|
+
readonly markUsed: (input: OAuthClientSecretStoreMarkUsedInput) => Effect.Effect<OptionTypes.Option<OAuthClientSecretRecord>, OAuthClientSecretStoreError>;
|
|
399
|
+
readonly revoke: (input: OAuthClientSecretStoreRevokeInput) => Effect.Effect<OptionTypes.Option<OAuthClientSecretRecord>, OAuthClientSecretStoreError>;
|
|
400
|
+
}
|
|
401
|
+
declare const OAuthClientSecretStore_base: Context.ServiceClass<OAuthClientSecretStore, "auth/OAuthClientSecretStore", OAuthClientSecretStoreService>;
|
|
402
|
+
export declare class OAuthClientSecretStore extends OAuthClientSecretStore_base {
|
|
403
|
+
}
|
|
404
|
+
export declare namespace OAuthClientSecretStore {
|
|
405
|
+
const make: (service: OAuthClientSecretStoreService) => OAuthClientSecretStoreService;
|
|
406
|
+
}
|
|
407
|
+
export interface OAuthClientSecretAuthenticateClientInput {
|
|
408
|
+
readonly clientId: OAuthClientId;
|
|
409
|
+
readonly method: OAuthClientSecretAuthenticationMethod;
|
|
410
|
+
readonly clientSecret: Redacted.Redacted<string>;
|
|
411
|
+
readonly now?: UnixMillis;
|
|
412
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
413
|
+
}
|
|
414
|
+
export type OAuthClientSecretVerificationOperation = "authenticate-client";
|
|
415
|
+
declare const OAuthClientSecretVerificationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
416
|
+
readonly _tag: "OAuthClientSecretVerificationError";
|
|
417
|
+
} & Readonly<A>;
|
|
418
|
+
export declare class OAuthClientSecretVerificationError extends OAuthClientSecretVerificationError_base<{
|
|
419
|
+
readonly operation: OAuthClientSecretVerificationOperation;
|
|
420
|
+
readonly message: string;
|
|
421
|
+
readonly cause?: unknown;
|
|
422
|
+
}> {
|
|
423
|
+
}
|
|
424
|
+
export interface OAuthClientSecretVerificationService {
|
|
425
|
+
readonly authenticateClient: (input: OAuthClientSecretAuthenticateClientInput) => Effect.Effect<boolean, OAuthClientSecretVerificationError>;
|
|
426
|
+
}
|
|
427
|
+
declare const OAuthClientSecretVerification_base: Context.ServiceClass<OAuthClientSecretVerification, "auth/OAuthClientSecretVerification", OAuthClientSecretVerificationService>;
|
|
428
|
+
export declare class OAuthClientSecretVerification extends OAuthClientSecretVerification_base {
|
|
429
|
+
}
|
|
430
|
+
export declare namespace OAuthClientSecretVerification {
|
|
431
|
+
const make: (service: OAuthClientSecretVerificationService) => OAuthClientSecretVerificationService;
|
|
432
|
+
}
|
|
433
|
+
export interface OAuthClientSecretVerificationDependencies {
|
|
434
|
+
readonly clientSecrets: OAuthClientSecretsService;
|
|
435
|
+
readonly secretStore: OAuthClientSecretStoreService;
|
|
436
|
+
}
|
|
437
|
+
export interface OAuthAuthorizationCodeRecord {
|
|
438
|
+
readonly codeHash: string;
|
|
439
|
+
readonly clientId: OAuthClientId;
|
|
440
|
+
readonly subject: string;
|
|
441
|
+
readonly redirectUri: string;
|
|
442
|
+
readonly scopes: readonly string[];
|
|
443
|
+
readonly codeChallenge?: OAuthCodeChallenge;
|
|
444
|
+
readonly codeChallengeMethod?: "S256";
|
|
445
|
+
readonly issuedAt: UnixMillis;
|
|
446
|
+
readonly expiresAt: UnixMillis;
|
|
447
|
+
readonly consumedAt?: UnixMillis;
|
|
448
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
449
|
+
}
|
|
450
|
+
export interface OAuthIssuedAuthorizationCode {
|
|
451
|
+
readonly code: Redacted.Redacted<OAuthAuthorizationCode>;
|
|
452
|
+
readonly clientId: OAuthClientId;
|
|
453
|
+
readonly subject: string;
|
|
454
|
+
readonly redirectUri: string;
|
|
455
|
+
readonly scopes: readonly string[];
|
|
456
|
+
readonly codeChallenge?: OAuthCodeChallenge;
|
|
457
|
+
readonly codeChallengeMethod?: "S256";
|
|
458
|
+
readonly issuedAt: UnixMillis;
|
|
459
|
+
readonly expiresAt: UnixMillis;
|
|
460
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
461
|
+
}
|
|
462
|
+
export interface OAuthConsumedAuthorizationCode {
|
|
463
|
+
readonly clientId: OAuthClientId;
|
|
464
|
+
readonly subject: string;
|
|
465
|
+
readonly redirectUri: string;
|
|
466
|
+
readonly scopes: readonly string[];
|
|
467
|
+
readonly codeChallenge?: OAuthCodeChallenge;
|
|
468
|
+
readonly codeChallengeMethod?: "S256";
|
|
469
|
+
readonly issuedAt: UnixMillis;
|
|
470
|
+
readonly expiresAt: UnixMillis;
|
|
471
|
+
readonly consumedAt: UnixMillis;
|
|
472
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
473
|
+
}
|
|
474
|
+
export interface OAuthAuthorizationCodeIssueInput {
|
|
475
|
+
readonly clientId: OAuthClientId;
|
|
476
|
+
readonly subject: string;
|
|
477
|
+
readonly redirectUri: string;
|
|
478
|
+
readonly scopes?: readonly string[];
|
|
479
|
+
readonly codeChallenge?: OAuthCodeChallenge | string;
|
|
480
|
+
readonly codeChallengeMethod?: "S256";
|
|
481
|
+
readonly code?: Redacted.Redacted<OAuthAuthorizationCode | string>;
|
|
482
|
+
readonly issuedAt?: UnixMillis;
|
|
483
|
+
readonly expiresAt?: UnixMillis;
|
|
484
|
+
readonly expiresIn?: Duration.Duration;
|
|
485
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
486
|
+
}
|
|
487
|
+
export interface OAuthAuthorizationCodeConsumeInput {
|
|
488
|
+
readonly code: Redacted.Redacted<OAuthAuthorizationCode | string>;
|
|
489
|
+
readonly clientId: OAuthClientId;
|
|
490
|
+
readonly redirectUri: string;
|
|
491
|
+
readonly codeVerifier?: Redacted.Redacted<OAuthCodeVerifier | string>;
|
|
492
|
+
readonly now?: UnixMillis;
|
|
493
|
+
}
|
|
494
|
+
export type OAuthAuthorizationCodeConsumeFailureReason = "unknown_code" | "already_consumed" | "expired" | "client_mismatch" | "redirect_uri_mismatch" | "pkce_required" | "pkce_mismatch";
|
|
495
|
+
export type OAuthAuthorizationCodeConsumeResult = {
|
|
496
|
+
readonly valid: true;
|
|
497
|
+
readonly code: OAuthConsumedAuthorizationCode;
|
|
498
|
+
} | {
|
|
499
|
+
readonly valid: false;
|
|
500
|
+
readonly reason: OAuthAuthorizationCodeConsumeFailureReason;
|
|
501
|
+
};
|
|
502
|
+
export interface OAuthAuthorizationCodeStoreLookupInput {
|
|
503
|
+
readonly codeHash: string;
|
|
504
|
+
}
|
|
505
|
+
export interface OAuthAuthorizationCodeStoreMarkConsumedInput extends OAuthAuthorizationCodeStoreLookupInput {
|
|
506
|
+
readonly consumedAt: UnixMillis;
|
|
507
|
+
}
|
|
508
|
+
export type OAuthAuthorizationCodeStoreMarkConsumedResult = {
|
|
509
|
+
readonly status: "missing";
|
|
510
|
+
} | {
|
|
511
|
+
readonly status: "already_consumed";
|
|
512
|
+
readonly record: OAuthAuthorizationCodeRecord;
|
|
513
|
+
} | {
|
|
514
|
+
readonly status: "consumed";
|
|
515
|
+
readonly record: OAuthAuthorizationCodeRecord;
|
|
516
|
+
};
|
|
517
|
+
export type OAuthAuthorizationCodeStoreOperation = "upsert" | "find" | "mark-consumed";
|
|
518
|
+
declare const OAuthAuthorizationCodeStoreError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
519
|
+
readonly _tag: "OAuthAuthorizationCodeStoreError";
|
|
520
|
+
} & Readonly<A>;
|
|
521
|
+
export declare class OAuthAuthorizationCodeStoreError extends OAuthAuthorizationCodeStoreError_base<{
|
|
522
|
+
readonly operation: OAuthAuthorizationCodeStoreOperation;
|
|
523
|
+
readonly message: string;
|
|
524
|
+
readonly cause?: unknown;
|
|
525
|
+
}> {
|
|
526
|
+
}
|
|
527
|
+
export interface OAuthAuthorizationCodeStoreService {
|
|
528
|
+
readonly upsert: (record: OAuthAuthorizationCodeRecord) => Effect.Effect<void, OAuthAuthorizationCodeStoreError>;
|
|
529
|
+
readonly findByHash: (input: OAuthAuthorizationCodeStoreLookupInput) => Effect.Effect<OptionTypes.Option<OAuthAuthorizationCodeRecord>, OAuthAuthorizationCodeStoreError>;
|
|
530
|
+
readonly markConsumed: (input: OAuthAuthorizationCodeStoreMarkConsumedInput) => Effect.Effect<OAuthAuthorizationCodeStoreMarkConsumedResult, OAuthAuthorizationCodeStoreError>;
|
|
531
|
+
}
|
|
532
|
+
declare const OAuthAuthorizationCodeStore_base: Context.ServiceClass<OAuthAuthorizationCodeStore, "auth/OAuthAuthorizationCodeStore", OAuthAuthorizationCodeStoreService>;
|
|
533
|
+
export declare class OAuthAuthorizationCodeStore extends OAuthAuthorizationCodeStore_base {
|
|
534
|
+
}
|
|
535
|
+
export declare namespace OAuthAuthorizationCodeStore {
|
|
536
|
+
const make: (service: OAuthAuthorizationCodeStoreService) => OAuthAuthorizationCodeStoreService;
|
|
537
|
+
}
|
|
538
|
+
export type OAuthAuthorizationCodeGrantOperation = "issue" | "consume";
|
|
539
|
+
declare const OAuthAuthorizationCodeGrantError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
540
|
+
readonly _tag: "OAuthAuthorizationCodeGrantError";
|
|
541
|
+
} & Readonly<A>;
|
|
542
|
+
export declare class OAuthAuthorizationCodeGrantError extends OAuthAuthorizationCodeGrantError_base<{
|
|
543
|
+
readonly operation: OAuthAuthorizationCodeGrantOperation;
|
|
544
|
+
readonly message: string;
|
|
545
|
+
readonly cause?: unknown;
|
|
546
|
+
}> {
|
|
547
|
+
}
|
|
548
|
+
export interface OAuthAuthorizationCodeGrantService {
|
|
549
|
+
readonly issue: (input: OAuthAuthorizationCodeIssueInput) => Effect.Effect<OAuthIssuedAuthorizationCode, OAuthAuthorizationCodeGrantError>;
|
|
550
|
+
readonly consume: (input: OAuthAuthorizationCodeConsumeInput) => Effect.Effect<OAuthAuthorizationCodeConsumeResult, OAuthAuthorizationCodeGrantError>;
|
|
551
|
+
}
|
|
552
|
+
declare const OAuthAuthorizationCodeGrant_base: Context.ServiceClass<OAuthAuthorizationCodeGrant, "auth/OAuthAuthorizationCodeGrant", OAuthAuthorizationCodeGrantService>;
|
|
553
|
+
export declare class OAuthAuthorizationCodeGrant extends OAuthAuthorizationCodeGrant_base {
|
|
554
|
+
}
|
|
555
|
+
export declare namespace OAuthAuthorizationCodeGrant {
|
|
556
|
+
const make: (service: OAuthAuthorizationCodeGrantService) => OAuthAuthorizationCodeGrantService;
|
|
557
|
+
}
|
|
558
|
+
export interface OAuthAuthorizationCodeTokenIssueInput {
|
|
559
|
+
readonly client: OAuthClientRecord;
|
|
560
|
+
readonly code: OAuthConsumedAuthorizationCode;
|
|
561
|
+
readonly now: UnixMillis;
|
|
562
|
+
}
|
|
563
|
+
export type OAuthAuthorizationCodeTokenIssuerOperation = "issue";
|
|
564
|
+
declare const OAuthAuthorizationCodeTokenIssuerError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
565
|
+
readonly _tag: "OAuthAuthorizationCodeTokenIssuerError";
|
|
566
|
+
} & Readonly<A>;
|
|
567
|
+
export declare class OAuthAuthorizationCodeTokenIssuerError extends OAuthAuthorizationCodeTokenIssuerError_base<{
|
|
568
|
+
readonly operation: OAuthAuthorizationCodeTokenIssuerOperation;
|
|
569
|
+
readonly message: string;
|
|
570
|
+
readonly cause?: unknown;
|
|
571
|
+
}> {
|
|
572
|
+
}
|
|
573
|
+
export interface OAuthAuthorizationCodeTokenIssuerService {
|
|
574
|
+
readonly issue: (input: OAuthAuthorizationCodeTokenIssueInput) => Effect.Effect<OAuthTokenResponse, OAuthAuthorizationCodeTokenIssuerError>;
|
|
575
|
+
}
|
|
576
|
+
declare const OAuthAuthorizationCodeTokenIssuer_base: Context.ServiceClass<OAuthAuthorizationCodeTokenIssuer, "auth/OAuthAuthorizationCodeTokenIssuer", OAuthAuthorizationCodeTokenIssuerService>;
|
|
577
|
+
export declare class OAuthAuthorizationCodeTokenIssuer extends OAuthAuthorizationCodeTokenIssuer_base {
|
|
578
|
+
}
|
|
579
|
+
export declare namespace OAuthAuthorizationCodeTokenIssuer {
|
|
580
|
+
const make: (service: OAuthAuthorizationCodeTokenIssuerService) => OAuthAuthorizationCodeTokenIssuerService;
|
|
581
|
+
}
|
|
582
|
+
export interface OAuthAuthorizationCodeTokenGrantInput {
|
|
583
|
+
readonly grantType: string;
|
|
584
|
+
readonly code?: Redacted.Redacted<OAuthAuthorizationCode | string>;
|
|
585
|
+
readonly clientId?: OAuthClientId | string;
|
|
586
|
+
readonly redirectUri?: string;
|
|
587
|
+
readonly codeVerifier?: Redacted.Redacted<OAuthCodeVerifier | string>;
|
|
588
|
+
readonly clientAuthenticated?: boolean;
|
|
589
|
+
readonly now?: UnixMillis;
|
|
590
|
+
}
|
|
591
|
+
export type OAuthAuthorizationCodeTokenGrantFailureReason = "invalid_request" | "invalid_client" | "invalid_grant" | "unauthorized_client" | "unsupported_grant_type";
|
|
592
|
+
export type OAuthAuthorizationCodeTokenGrantResult = {
|
|
593
|
+
readonly valid: true;
|
|
594
|
+
readonly client: OAuthClientRecord;
|
|
595
|
+
readonly code: OAuthConsumedAuthorizationCode;
|
|
596
|
+
readonly tokens: OAuthTokenResponse;
|
|
597
|
+
} | {
|
|
598
|
+
readonly valid: false;
|
|
599
|
+
readonly reason: OAuthAuthorizationCodeTokenGrantFailureReason;
|
|
600
|
+
};
|
|
601
|
+
export type OAuthAuthorizationCodeTokenGrantOperation = "exchange";
|
|
602
|
+
declare const OAuthAuthorizationCodeTokenGrantError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
603
|
+
readonly _tag: "OAuthAuthorizationCodeTokenGrantError";
|
|
604
|
+
} & Readonly<A>;
|
|
605
|
+
export declare class OAuthAuthorizationCodeTokenGrantError extends OAuthAuthorizationCodeTokenGrantError_base<{
|
|
606
|
+
readonly operation: OAuthAuthorizationCodeTokenGrantOperation;
|
|
607
|
+
readonly message: string;
|
|
608
|
+
readonly cause?: unknown;
|
|
609
|
+
}> {
|
|
610
|
+
}
|
|
611
|
+
export interface OAuthAuthorizationCodeTokenGrantService {
|
|
612
|
+
readonly exchange: (input: OAuthAuthorizationCodeTokenGrantInput) => Effect.Effect<OAuthAuthorizationCodeTokenGrantResult, OAuthAuthorizationCodeTokenGrantError>;
|
|
613
|
+
}
|
|
614
|
+
declare const OAuthAuthorizationCodeTokenGrant_base: Context.ServiceClass<OAuthAuthorizationCodeTokenGrant, "auth/OAuthAuthorizationCodeTokenGrant", OAuthAuthorizationCodeTokenGrantService>;
|
|
615
|
+
export declare class OAuthAuthorizationCodeTokenGrant extends OAuthAuthorizationCodeTokenGrant_base {
|
|
616
|
+
}
|
|
617
|
+
export declare namespace OAuthAuthorizationCodeTokenGrant {
|
|
618
|
+
const make: (service: OAuthAuthorizationCodeTokenGrantService) => OAuthAuthorizationCodeTokenGrantService;
|
|
619
|
+
}
|
|
620
|
+
export interface OAuthRefreshTokenIssueInput {
|
|
621
|
+
readonly client: OAuthClientRecord;
|
|
622
|
+
readonly refreshToken: Redacted.Redacted<OAuthRefreshToken | string>;
|
|
623
|
+
readonly scopes?: readonly string[];
|
|
624
|
+
readonly now: UnixMillis;
|
|
625
|
+
}
|
|
626
|
+
export type OAuthRefreshTokenIssueFailureReason = "invalid_grant" | "invalid_scope";
|
|
627
|
+
export type OAuthRefreshTokenIssueResult = {
|
|
628
|
+
readonly valid: true;
|
|
629
|
+
readonly tokens: OAuthTokenResponse;
|
|
630
|
+
} | {
|
|
631
|
+
readonly valid: false;
|
|
632
|
+
readonly reason: OAuthRefreshTokenIssueFailureReason;
|
|
633
|
+
};
|
|
634
|
+
export type OAuthRefreshTokenIssuerOperation = "issue";
|
|
635
|
+
declare const OAuthRefreshTokenIssuerError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
636
|
+
readonly _tag: "OAuthRefreshTokenIssuerError";
|
|
637
|
+
} & Readonly<A>;
|
|
638
|
+
export declare class OAuthRefreshTokenIssuerError extends OAuthRefreshTokenIssuerError_base<{
|
|
639
|
+
readonly operation: OAuthRefreshTokenIssuerOperation;
|
|
640
|
+
readonly message: string;
|
|
641
|
+
readonly cause?: unknown;
|
|
642
|
+
}> {
|
|
643
|
+
}
|
|
644
|
+
export interface OAuthRefreshTokenIssuerService {
|
|
645
|
+
readonly issue: (input: OAuthRefreshTokenIssueInput) => Effect.Effect<OAuthRefreshTokenIssueResult, OAuthRefreshTokenIssuerError>;
|
|
646
|
+
}
|
|
647
|
+
declare const OAuthRefreshTokenIssuer_base: Context.ServiceClass<OAuthRefreshTokenIssuer, "auth/OAuthRefreshTokenIssuer", OAuthRefreshTokenIssuerService>;
|
|
648
|
+
export declare class OAuthRefreshTokenIssuer extends OAuthRefreshTokenIssuer_base {
|
|
649
|
+
}
|
|
650
|
+
export declare namespace OAuthRefreshTokenIssuer {
|
|
651
|
+
const make: (service: OAuthRefreshTokenIssuerService) => OAuthRefreshTokenIssuerService;
|
|
652
|
+
}
|
|
653
|
+
export interface OAuthRefreshTokenGrantInput {
|
|
654
|
+
readonly grantType: string;
|
|
655
|
+
readonly refreshToken?: Redacted.Redacted<OAuthRefreshToken | string>;
|
|
656
|
+
readonly clientId?: OAuthClientId | string;
|
|
657
|
+
readonly scopes?: readonly string[] | string;
|
|
658
|
+
readonly clientAuthenticated?: boolean;
|
|
659
|
+
readonly now?: UnixMillis;
|
|
660
|
+
}
|
|
661
|
+
export type OAuthRefreshTokenGrantFailureReason = "invalid_request" | "invalid_client" | "invalid_grant" | "unauthorized_client" | "unsupported_grant_type" | "invalid_scope";
|
|
662
|
+
export type OAuthRefreshTokenGrantResult = {
|
|
663
|
+
readonly valid: true;
|
|
664
|
+
readonly client: OAuthClientRecord;
|
|
665
|
+
readonly tokens: OAuthTokenResponse;
|
|
666
|
+
} | {
|
|
667
|
+
readonly valid: false;
|
|
668
|
+
readonly reason: OAuthRefreshTokenGrantFailureReason;
|
|
669
|
+
};
|
|
670
|
+
export type OAuthRefreshTokenGrantOperation = "exchange";
|
|
671
|
+
declare const OAuthRefreshTokenGrantError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
672
|
+
readonly _tag: "OAuthRefreshTokenGrantError";
|
|
673
|
+
} & Readonly<A>;
|
|
674
|
+
export declare class OAuthRefreshTokenGrantError extends OAuthRefreshTokenGrantError_base<{
|
|
675
|
+
readonly operation: OAuthRefreshTokenGrantOperation;
|
|
676
|
+
readonly message: string;
|
|
677
|
+
readonly cause?: unknown;
|
|
678
|
+
}> {
|
|
679
|
+
}
|
|
680
|
+
export interface OAuthRefreshTokenGrantService {
|
|
681
|
+
readonly exchange: (input: OAuthRefreshTokenGrantInput) => Effect.Effect<OAuthRefreshTokenGrantResult, OAuthRefreshTokenGrantError>;
|
|
682
|
+
}
|
|
683
|
+
declare const OAuthRefreshTokenGrant_base: Context.ServiceClass<OAuthRefreshTokenGrant, "auth/OAuthRefreshTokenGrant", OAuthRefreshTokenGrantService>;
|
|
684
|
+
export declare class OAuthRefreshTokenGrant extends OAuthRefreshTokenGrant_base {
|
|
685
|
+
}
|
|
686
|
+
export declare namespace OAuthRefreshTokenGrant {
|
|
687
|
+
const make: (service: OAuthRefreshTokenGrantService) => OAuthRefreshTokenGrantService;
|
|
688
|
+
}
|
|
689
|
+
export interface OAuthClientCredentialsTokenIssueInput {
|
|
690
|
+
readonly client: OAuthClientRecord;
|
|
691
|
+
readonly scopes?: readonly string[];
|
|
692
|
+
readonly now: UnixMillis;
|
|
693
|
+
}
|
|
694
|
+
export type OAuthClientCredentialsTokenIssueFailureReason = "invalid_scope";
|
|
695
|
+
export type OAuthClientCredentialsTokenIssueResult = {
|
|
696
|
+
readonly valid: true;
|
|
697
|
+
readonly tokens: OAuthTokenResponse;
|
|
698
|
+
} | {
|
|
699
|
+
readonly valid: false;
|
|
700
|
+
readonly reason: OAuthClientCredentialsTokenIssueFailureReason;
|
|
701
|
+
};
|
|
702
|
+
export type OAuthClientCredentialsTokenIssuerOperation = "issue";
|
|
703
|
+
declare const OAuthClientCredentialsTokenIssuerError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
704
|
+
readonly _tag: "OAuthClientCredentialsTokenIssuerError";
|
|
705
|
+
} & Readonly<A>;
|
|
706
|
+
export declare class OAuthClientCredentialsTokenIssuerError extends OAuthClientCredentialsTokenIssuerError_base<{
|
|
707
|
+
readonly operation: OAuthClientCredentialsTokenIssuerOperation;
|
|
708
|
+
readonly message: string;
|
|
709
|
+
readonly cause?: unknown;
|
|
710
|
+
}> {
|
|
711
|
+
}
|
|
712
|
+
export interface OAuthClientCredentialsTokenIssuerService {
|
|
713
|
+
readonly issue: (input: OAuthClientCredentialsTokenIssueInput) => Effect.Effect<OAuthClientCredentialsTokenIssueResult, OAuthClientCredentialsTokenIssuerError>;
|
|
714
|
+
}
|
|
715
|
+
declare const OAuthClientCredentialsTokenIssuer_base: Context.ServiceClass<OAuthClientCredentialsTokenIssuer, "auth/OAuthClientCredentialsTokenIssuer", OAuthClientCredentialsTokenIssuerService>;
|
|
716
|
+
export declare class OAuthClientCredentialsTokenIssuer extends OAuthClientCredentialsTokenIssuer_base {
|
|
717
|
+
}
|
|
718
|
+
export declare namespace OAuthClientCredentialsTokenIssuer {
|
|
719
|
+
const make: (service: OAuthClientCredentialsTokenIssuerService) => OAuthClientCredentialsTokenIssuerService;
|
|
720
|
+
}
|
|
721
|
+
export interface OAuthClientCredentialsGrantInput {
|
|
722
|
+
readonly grantType: string;
|
|
723
|
+
readonly clientId?: OAuthClientId | string;
|
|
724
|
+
readonly scopes?: readonly string[] | string;
|
|
725
|
+
readonly clientAuthenticated?: boolean;
|
|
726
|
+
readonly now?: UnixMillis;
|
|
727
|
+
}
|
|
728
|
+
export type OAuthClientCredentialsGrantFailureReason = "invalid_request" | "invalid_client" | "unauthorized_client" | "unsupported_grant_type" | "invalid_scope";
|
|
729
|
+
export type OAuthClientCredentialsGrantResult = {
|
|
730
|
+
readonly valid: true;
|
|
731
|
+
readonly client: OAuthClientRecord;
|
|
732
|
+
readonly tokens: OAuthTokenResponse;
|
|
733
|
+
} | {
|
|
734
|
+
readonly valid: false;
|
|
735
|
+
readonly reason: OAuthClientCredentialsGrantFailureReason;
|
|
736
|
+
};
|
|
737
|
+
export type OAuthClientCredentialsGrantOperation = "exchange";
|
|
738
|
+
declare const OAuthClientCredentialsGrantError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
739
|
+
readonly _tag: "OAuthClientCredentialsGrantError";
|
|
740
|
+
} & Readonly<A>;
|
|
741
|
+
export declare class OAuthClientCredentialsGrantError extends OAuthClientCredentialsGrantError_base<{
|
|
742
|
+
readonly operation: OAuthClientCredentialsGrantOperation;
|
|
743
|
+
readonly message: string;
|
|
744
|
+
readonly cause?: unknown;
|
|
745
|
+
}> {
|
|
746
|
+
}
|
|
747
|
+
export interface OAuthClientCredentialsGrantService {
|
|
748
|
+
readonly exchange: (input: OAuthClientCredentialsGrantInput) => Effect.Effect<OAuthClientCredentialsGrantResult, OAuthClientCredentialsGrantError>;
|
|
749
|
+
}
|
|
750
|
+
declare const OAuthClientCredentialsGrant_base: Context.ServiceClass<OAuthClientCredentialsGrant, "auth/OAuthClientCredentialsGrant", OAuthClientCredentialsGrantService>;
|
|
751
|
+
export declare class OAuthClientCredentialsGrant extends OAuthClientCredentialsGrant_base {
|
|
752
|
+
}
|
|
753
|
+
export declare namespace OAuthClientCredentialsGrant {
|
|
754
|
+
const make: (service: OAuthClientCredentialsGrantService) => OAuthClientCredentialsGrantService;
|
|
755
|
+
}
|
|
756
|
+
export interface OAuthTokenRevokeInput {
|
|
757
|
+
readonly client: OAuthClientRecord;
|
|
758
|
+
readonly token: Redacted.Redacted<OAuthAccessToken | OAuthRefreshToken | string>;
|
|
759
|
+
readonly tokenTypeHint?: OAuthTokenRevocationHint;
|
|
760
|
+
readonly now: UnixMillis;
|
|
761
|
+
}
|
|
762
|
+
export type OAuthTokenRevokerOperation = "revoke";
|
|
763
|
+
declare const OAuthTokenRevokerError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
764
|
+
readonly _tag: "OAuthTokenRevokerError";
|
|
765
|
+
} & Readonly<A>;
|
|
766
|
+
export declare class OAuthTokenRevokerError extends OAuthTokenRevokerError_base<{
|
|
767
|
+
readonly operation: OAuthTokenRevokerOperation;
|
|
768
|
+
readonly message: string;
|
|
769
|
+
readonly cause?: unknown;
|
|
770
|
+
}> {
|
|
771
|
+
}
|
|
772
|
+
export interface OAuthTokenRevokerService {
|
|
773
|
+
readonly revoke: (input: OAuthTokenRevokeInput) => Effect.Effect<void, OAuthTokenRevokerError>;
|
|
774
|
+
}
|
|
775
|
+
declare const OAuthTokenRevoker_base: Context.ServiceClass<OAuthTokenRevoker, "auth/OAuthTokenRevoker", OAuthTokenRevokerService>;
|
|
776
|
+
export declare class OAuthTokenRevoker extends OAuthTokenRevoker_base {
|
|
777
|
+
}
|
|
778
|
+
export declare namespace OAuthTokenRevoker {
|
|
779
|
+
const make: (service: OAuthTokenRevokerService) => OAuthTokenRevokerService;
|
|
780
|
+
}
|
|
781
|
+
export interface OAuthTokenRevocationRequestInput {
|
|
782
|
+
readonly token?: Redacted.Redacted<OAuthAccessToken | OAuthRefreshToken | string>;
|
|
783
|
+
readonly tokenTypeHint?: OAuthTokenRevocationHint | string;
|
|
784
|
+
readonly clientId?: OAuthClientId | string;
|
|
785
|
+
readonly clientAuthenticated?: boolean;
|
|
786
|
+
readonly now?: UnixMillis;
|
|
787
|
+
}
|
|
788
|
+
export type OAuthTokenRevocationFailureReason = "invalid_request" | "invalid_client" | "unsupported_token_type";
|
|
789
|
+
export type OAuthTokenRevocationResult = {
|
|
790
|
+
readonly valid: true;
|
|
791
|
+
readonly client: OAuthClientRecord;
|
|
792
|
+
} | {
|
|
793
|
+
readonly valid: false;
|
|
794
|
+
readonly reason: OAuthTokenRevocationFailureReason;
|
|
795
|
+
};
|
|
796
|
+
export type OAuthTokenRevocationOperation = "revoke";
|
|
797
|
+
declare const OAuthTokenRevocationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
798
|
+
readonly _tag: "OAuthTokenRevocationError";
|
|
799
|
+
} & Readonly<A>;
|
|
800
|
+
export declare class OAuthTokenRevocationError extends OAuthTokenRevocationError_base<{
|
|
801
|
+
readonly operation: OAuthTokenRevocationOperation;
|
|
802
|
+
readonly message: string;
|
|
803
|
+
readonly cause?: unknown;
|
|
804
|
+
}> {
|
|
805
|
+
}
|
|
806
|
+
export interface OAuthTokenRevocationService {
|
|
807
|
+
readonly revoke: (input: OAuthTokenRevocationRequestInput) => Effect.Effect<OAuthTokenRevocationResult, OAuthTokenRevocationError>;
|
|
808
|
+
}
|
|
809
|
+
declare const OAuthTokenRevocation_base: Context.ServiceClass<OAuthTokenRevocation, "auth/OAuthTokenRevocation", OAuthTokenRevocationService>;
|
|
810
|
+
export declare class OAuthTokenRevocation extends OAuthTokenRevocation_base {
|
|
811
|
+
}
|
|
812
|
+
export declare namespace OAuthTokenRevocation {
|
|
813
|
+
const make: (service: OAuthTokenRevocationService) => OAuthTokenRevocationService;
|
|
814
|
+
}
|
|
815
|
+
export interface OAuthTokenIntrospectInput {
|
|
816
|
+
readonly client: OAuthClientRecord;
|
|
817
|
+
readonly token: Redacted.Redacted<OAuthAccessToken | OAuthRefreshToken | string>;
|
|
818
|
+
readonly tokenTypeHint?: string;
|
|
819
|
+
readonly now: UnixMillis;
|
|
820
|
+
}
|
|
821
|
+
export type OAuthTokenIntrospectionResponse = {
|
|
822
|
+
readonly active: false;
|
|
823
|
+
} | {
|
|
824
|
+
readonly active: true;
|
|
825
|
+
readonly scopes?: readonly string[];
|
|
826
|
+
readonly clientId?: OAuthClientId | string;
|
|
827
|
+
readonly username?: string;
|
|
828
|
+
readonly tokenType?: string;
|
|
829
|
+
readonly expiresAt?: UnixMillis;
|
|
830
|
+
readonly issuedAt?: UnixMillis;
|
|
831
|
+
readonly notBefore?: UnixMillis;
|
|
832
|
+
readonly subject?: string;
|
|
833
|
+
readonly audience?: string | readonly string[];
|
|
834
|
+
readonly issuer?: string;
|
|
835
|
+
readonly jwtId?: string;
|
|
836
|
+
readonly extra?: Readonly<Record<string, unknown>>;
|
|
837
|
+
};
|
|
838
|
+
export type OAuthTokenIntrospectorOperation = "introspect";
|
|
839
|
+
declare const OAuthTokenIntrospectorError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
840
|
+
readonly _tag: "OAuthTokenIntrospectorError";
|
|
841
|
+
} & Readonly<A>;
|
|
842
|
+
export declare class OAuthTokenIntrospectorError extends OAuthTokenIntrospectorError_base<{
|
|
843
|
+
readonly operation: OAuthTokenIntrospectorOperation;
|
|
844
|
+
readonly message: string;
|
|
845
|
+
readonly cause?: unknown;
|
|
846
|
+
}> {
|
|
847
|
+
}
|
|
848
|
+
export interface OAuthTokenIntrospectorService {
|
|
849
|
+
readonly introspect: (input: OAuthTokenIntrospectInput) => Effect.Effect<OAuthTokenIntrospectionResponse, OAuthTokenIntrospectorError>;
|
|
850
|
+
}
|
|
851
|
+
declare const OAuthTokenIntrospector_base: Context.ServiceClass<OAuthTokenIntrospector, "auth/OAuthTokenIntrospector", OAuthTokenIntrospectorService>;
|
|
852
|
+
export declare class OAuthTokenIntrospector extends OAuthTokenIntrospector_base {
|
|
853
|
+
}
|
|
854
|
+
export declare namespace OAuthTokenIntrospector {
|
|
855
|
+
const make: (service: OAuthTokenIntrospectorService) => OAuthTokenIntrospectorService;
|
|
856
|
+
}
|
|
857
|
+
export interface OAuthTokenIntrospectionRequestInput {
|
|
858
|
+
readonly token?: Redacted.Redacted<OAuthAccessToken | OAuthRefreshToken | string>;
|
|
859
|
+
readonly tokenTypeHint?: string;
|
|
860
|
+
readonly clientId?: OAuthClientId | string;
|
|
861
|
+
readonly clientAuthenticated?: boolean;
|
|
862
|
+
readonly now?: UnixMillis;
|
|
863
|
+
}
|
|
864
|
+
export type OAuthTokenIntrospectionFailureReason = "invalid_request" | "invalid_client";
|
|
865
|
+
export type OAuthTokenIntrospectionResult = {
|
|
866
|
+
readonly valid: true;
|
|
867
|
+
readonly client: OAuthClientRecord;
|
|
868
|
+
readonly introspection: OAuthTokenIntrospectionResponse;
|
|
869
|
+
} | {
|
|
870
|
+
readonly valid: false;
|
|
871
|
+
readonly reason: OAuthTokenIntrospectionFailureReason;
|
|
872
|
+
};
|
|
873
|
+
export type OAuthTokenIntrospectionOperation = "introspect";
|
|
874
|
+
declare const OAuthTokenIntrospectionError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
875
|
+
readonly _tag: "OAuthTokenIntrospectionError";
|
|
876
|
+
} & Readonly<A>;
|
|
877
|
+
export declare class OAuthTokenIntrospectionError extends OAuthTokenIntrospectionError_base<{
|
|
878
|
+
readonly operation: OAuthTokenIntrospectionOperation;
|
|
879
|
+
readonly message: string;
|
|
880
|
+
readonly cause?: unknown;
|
|
881
|
+
}> {
|
|
882
|
+
}
|
|
883
|
+
export interface OAuthTokenIntrospectionService {
|
|
884
|
+
readonly introspect: (input: OAuthTokenIntrospectionRequestInput) => Effect.Effect<OAuthTokenIntrospectionResult, OAuthTokenIntrospectionError>;
|
|
885
|
+
}
|
|
886
|
+
declare const OAuthTokenIntrospection_base: Context.ServiceClass<OAuthTokenIntrospection, "auth/OAuthTokenIntrospection", OAuthTokenIntrospectionService>;
|
|
887
|
+
export declare class OAuthTokenIntrospection extends OAuthTokenIntrospection_base {
|
|
888
|
+
}
|
|
889
|
+
export declare namespace OAuthTokenIntrospection {
|
|
890
|
+
const make: (service: OAuthTokenIntrospectionService) => OAuthTokenIntrospectionService;
|
|
891
|
+
}
|
|
892
|
+
export interface OAuthProviderAuthorizationInput {
|
|
893
|
+
readonly responseType: string;
|
|
894
|
+
readonly clientId?: OAuthClientId | string;
|
|
895
|
+
readonly redirectUri?: string;
|
|
896
|
+
readonly scopes?: readonly string[] | string;
|
|
897
|
+
readonly state?: string;
|
|
898
|
+
readonly codeChallenge?: OAuthCodeChallenge | string;
|
|
899
|
+
readonly codeChallengeMethod?: string;
|
|
900
|
+
readonly now?: UnixMillis;
|
|
901
|
+
}
|
|
902
|
+
export type OAuthProviderAuthorizationFailureReason = "invalid_request" | "unauthorized_client" | "access_denied" | "unsupported_response_type" | "invalid_scope" | "login_required" | "consent_required";
|
|
903
|
+
export interface OAuthProviderAuthorizationPolicyInput {
|
|
904
|
+
readonly client: OAuthClientRecord;
|
|
905
|
+
readonly requestedScopes: readonly string[];
|
|
906
|
+
readonly state?: string;
|
|
907
|
+
readonly request: OAuthProviderAuthorizationInput;
|
|
908
|
+
}
|
|
909
|
+
export type OAuthProviderAuthorizationDecision = {
|
|
910
|
+
readonly type: "allow";
|
|
911
|
+
readonly subject: string;
|
|
912
|
+
readonly scopes?: readonly string[];
|
|
913
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
914
|
+
} | {
|
|
915
|
+
readonly type: "deny";
|
|
916
|
+
readonly reason: OAuthProviderAuthorizationFailureReason;
|
|
917
|
+
readonly errorDescription?: string;
|
|
918
|
+
};
|
|
919
|
+
export type OAuthProviderAuthorizationPolicyOperation = "decide";
|
|
920
|
+
declare const OAuthProviderAuthorizationPolicyError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
921
|
+
readonly _tag: "OAuthProviderAuthorizationPolicyError";
|
|
922
|
+
} & Readonly<A>;
|
|
923
|
+
export declare class OAuthProviderAuthorizationPolicyError extends OAuthProviderAuthorizationPolicyError_base<{
|
|
924
|
+
readonly operation: OAuthProviderAuthorizationPolicyOperation;
|
|
925
|
+
readonly message: string;
|
|
926
|
+
readonly cause?: unknown;
|
|
927
|
+
}> {
|
|
928
|
+
}
|
|
929
|
+
export interface OAuthProviderAuthorizationPolicyService {
|
|
930
|
+
readonly decide: (input: OAuthProviderAuthorizationPolicyInput) => Effect.Effect<OAuthProviderAuthorizationDecision, OAuthProviderAuthorizationPolicyError>;
|
|
931
|
+
}
|
|
932
|
+
declare const OAuthProviderAuthorizationPolicy_base: Context.ServiceClass<OAuthProviderAuthorizationPolicy, "auth/OAuthProviderAuthorizationPolicy", OAuthProviderAuthorizationPolicyService>;
|
|
933
|
+
export declare class OAuthProviderAuthorizationPolicy extends OAuthProviderAuthorizationPolicy_base {
|
|
934
|
+
}
|
|
935
|
+
export declare namespace OAuthProviderAuthorizationPolicy {
|
|
936
|
+
const make: (service: OAuthProviderAuthorizationPolicyService) => OAuthProviderAuthorizationPolicyService;
|
|
937
|
+
}
|
|
938
|
+
export type OAuthProviderAuthorizationResult = {
|
|
939
|
+
readonly valid: true;
|
|
940
|
+
readonly client: OAuthClientRecord;
|
|
941
|
+
readonly redirectUri: string;
|
|
942
|
+
readonly state?: string;
|
|
943
|
+
readonly code: OAuthIssuedAuthorizationCode;
|
|
944
|
+
} | {
|
|
945
|
+
readonly valid: false;
|
|
946
|
+
readonly reason: OAuthProviderAuthorizationFailureReason;
|
|
947
|
+
readonly redirectUri?: string;
|
|
948
|
+
readonly state?: string;
|
|
949
|
+
readonly client?: OAuthClientRecord;
|
|
950
|
+
readonly errorDescription?: string;
|
|
951
|
+
};
|
|
952
|
+
export type OAuthProviderAuthorizationOperation = "authorize";
|
|
953
|
+
declare const OAuthProviderAuthorizationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
954
|
+
readonly _tag: "OAuthProviderAuthorizationError";
|
|
955
|
+
} & Readonly<A>;
|
|
956
|
+
export declare class OAuthProviderAuthorizationError extends OAuthProviderAuthorizationError_base<{
|
|
957
|
+
readonly operation: OAuthProviderAuthorizationOperation;
|
|
958
|
+
readonly message: string;
|
|
959
|
+
readonly cause?: unknown;
|
|
960
|
+
}> {
|
|
961
|
+
}
|
|
962
|
+
export interface OAuthProviderAuthorizationService {
|
|
963
|
+
readonly authorize: (input: OAuthProviderAuthorizationInput) => Effect.Effect<OAuthProviderAuthorizationResult, OAuthProviderAuthorizationError>;
|
|
964
|
+
}
|
|
965
|
+
declare const OAuthProviderAuthorization_base: Context.ServiceClass<OAuthProviderAuthorization, "auth/OAuthProviderAuthorization", OAuthProviderAuthorizationService>;
|
|
966
|
+
export declare class OAuthProviderAuthorization extends OAuthProviderAuthorization_base {
|
|
967
|
+
}
|
|
968
|
+
export declare namespace OAuthProviderAuthorization {
|
|
969
|
+
const make: (service: OAuthProviderAuthorizationService) => OAuthProviderAuthorizationService;
|
|
970
|
+
}
|
|
971
|
+
export type OAuthClientAuthentication = {
|
|
972
|
+
readonly method: "none";
|
|
973
|
+
} | {
|
|
974
|
+
readonly method: "client_secret_basic";
|
|
975
|
+
readonly clientSecret: Redacted.Redacted<string>;
|
|
976
|
+
} | {
|
|
977
|
+
readonly method: "client_secret_post";
|
|
978
|
+
readonly clientSecret: Redacted.Redacted<string>;
|
|
979
|
+
};
|
|
980
|
+
export interface OAuthAuthorizationCodeTokenInput {
|
|
981
|
+
readonly provider: OAuthProviderConfig;
|
|
982
|
+
readonly code: OAuthAuthorizationCode | string;
|
|
983
|
+
readonly codeVerifier: Redacted.Redacted<OAuthCodeVerifier | string>;
|
|
984
|
+
readonly redirectUri?: string;
|
|
985
|
+
readonly clientAuthentication?: OAuthClientAuthentication;
|
|
986
|
+
readonly params?: Readonly<Record<string, string>>;
|
|
987
|
+
}
|
|
988
|
+
export interface OAuthRefreshTokenInput {
|
|
989
|
+
readonly provider: OAuthProviderConfig;
|
|
990
|
+
readonly refreshToken: Redacted.Redacted<OAuthRefreshToken | string>;
|
|
991
|
+
readonly clientAuthentication?: OAuthClientAuthentication;
|
|
992
|
+
readonly scopes?: readonly string[];
|
|
993
|
+
readonly params?: Readonly<Record<string, string>>;
|
|
994
|
+
}
|
|
995
|
+
export type OAuthTokenRevocationHint = "access_token" | "refresh_token";
|
|
996
|
+
export interface OAuthTokenRevocationInput {
|
|
997
|
+
readonly provider: OAuthProviderConfig;
|
|
998
|
+
readonly token: Redacted.Redacted<OAuthAccessToken | OAuthRefreshToken | string>;
|
|
999
|
+
readonly tokenTypeHint?: OAuthTokenRevocationHint;
|
|
1000
|
+
readonly clientAuthentication?: OAuthClientAuthentication;
|
|
1001
|
+
readonly params?: Readonly<Record<string, string>>;
|
|
1002
|
+
}
|
|
1003
|
+
export interface OAuthTokenRequest {
|
|
1004
|
+
readonly url: string;
|
|
1005
|
+
readonly method: "POST";
|
|
1006
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
1007
|
+
readonly body: string;
|
|
1008
|
+
}
|
|
1009
|
+
export interface OAuthUserInfoRequestInput {
|
|
1010
|
+
readonly provider: OAuthProviderConfig;
|
|
1011
|
+
readonly accessToken: Redacted.Redacted<OAuthAccessToken | string>;
|
|
1012
|
+
readonly params?: Readonly<Record<string, string>>;
|
|
1013
|
+
readonly headers?: Readonly<Record<string, string>>;
|
|
1014
|
+
}
|
|
1015
|
+
export interface OAuthUserInfoRequest {
|
|
1016
|
+
readonly url: string;
|
|
1017
|
+
readonly method: "GET";
|
|
1018
|
+
readonly headers: Readonly<Record<string, string>>;
|
|
1019
|
+
}
|
|
1020
|
+
export type OAuthUserInfo = Readonly<Record<string, unknown>>;
|
|
1021
|
+
export type OAuthUserInfoOperation = "request" | "decode";
|
|
1022
|
+
declare const OAuthUserInfoError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
1023
|
+
readonly _tag: "OAuthUserInfoError";
|
|
1024
|
+
} & Readonly<A>;
|
|
1025
|
+
export declare class OAuthUserInfoError extends OAuthUserInfoError_base<{
|
|
1026
|
+
readonly operation: OAuthUserInfoOperation;
|
|
1027
|
+
readonly message: string;
|
|
1028
|
+
readonly cause?: unknown;
|
|
1029
|
+
}> {
|
|
1030
|
+
}
|
|
1031
|
+
export interface OAuthTokenResponse {
|
|
1032
|
+
readonly accessToken: Redacted.Redacted<OAuthAccessToken>;
|
|
1033
|
+
readonly tokenType: string;
|
|
1034
|
+
readonly expiresIn?: number;
|
|
1035
|
+
readonly refreshToken?: Redacted.Redacted<OAuthRefreshToken>;
|
|
1036
|
+
readonly idToken?: Redacted.Redacted<OAuthIdToken>;
|
|
1037
|
+
readonly scopes?: readonly string[];
|
|
1038
|
+
readonly extra?: Readonly<Record<string, unknown>>;
|
|
1039
|
+
}
|
|
1040
|
+
export type OAuthProviderModeTokenType = "access_token" | "refresh_token";
|
|
1041
|
+
export interface OAuthProviderModeTokenRecord {
|
|
1042
|
+
readonly tokenHash: string;
|
|
1043
|
+
readonly tokenType: OAuthProviderModeTokenType;
|
|
1044
|
+
readonly clientId: OAuthClientId;
|
|
1045
|
+
readonly subject: string;
|
|
1046
|
+
readonly scopes: readonly string[];
|
|
1047
|
+
readonly issuedAt: UnixMillis;
|
|
1048
|
+
readonly expiresAt: UnixMillis;
|
|
1049
|
+
readonly issuer?: string;
|
|
1050
|
+
readonly audience?: string | readonly string[];
|
|
1051
|
+
readonly jwtId?: string;
|
|
1052
|
+
readonly revokedAt?: UnixMillis;
|
|
1053
|
+
readonly revocationReason?: string;
|
|
1054
|
+
readonly rotatedAt?: UnixMillis;
|
|
1055
|
+
readonly replacedByTokenHash?: string;
|
|
1056
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
1057
|
+
}
|
|
1058
|
+
export interface OAuthProviderModeTokenStoreLookupInput {
|
|
1059
|
+
readonly tokenHash: string;
|
|
1060
|
+
}
|
|
1061
|
+
export interface OAuthProviderModeTokenStoreRevokeInput extends OAuthProviderModeTokenStoreLookupInput {
|
|
1062
|
+
readonly tokenTypeHint?: OAuthProviderModeTokenType;
|
|
1063
|
+
readonly revokedAt: UnixMillis;
|
|
1064
|
+
readonly reason?: string;
|
|
1065
|
+
}
|
|
1066
|
+
export interface OAuthProviderModeTokenStoreRotateInput extends OAuthProviderModeTokenStoreLookupInput {
|
|
1067
|
+
readonly replacedByTokenHash: string;
|
|
1068
|
+
readonly rotatedAt: UnixMillis;
|
|
1069
|
+
}
|
|
1070
|
+
export interface OAuthProviderModeTokenStoreDeleteRetiredCutoffs {
|
|
1071
|
+
readonly beforeExpiresAt?: UnixMillis;
|
|
1072
|
+
readonly beforeRevokedAt?: UnixMillis;
|
|
1073
|
+
readonly beforeRotatedAt?: UnixMillis;
|
|
1074
|
+
}
|
|
1075
|
+
export type OAuthProviderModeTokenStoreDeleteRetiredInput = (OAuthProviderModeTokenStoreDeleteRetiredCutoffs & {
|
|
1076
|
+
readonly beforeExpiresAt: UnixMillis;
|
|
1077
|
+
}) | (OAuthProviderModeTokenStoreDeleteRetiredCutoffs & {
|
|
1078
|
+
readonly beforeRevokedAt: UnixMillis;
|
|
1079
|
+
}) | (OAuthProviderModeTokenStoreDeleteRetiredCutoffs & {
|
|
1080
|
+
readonly beforeRotatedAt: UnixMillis;
|
|
1081
|
+
});
|
|
1082
|
+
export type OAuthProviderModeTokenStoreOperation = "upsert" | "find" | "revoke" | "rotate" | "deleteRetired";
|
|
1083
|
+
declare const OAuthProviderModeTokenStoreError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
1084
|
+
readonly _tag: "OAuthProviderModeTokenStoreError";
|
|
1085
|
+
} & Readonly<A>;
|
|
1086
|
+
export declare class OAuthProviderModeTokenStoreError extends OAuthProviderModeTokenStoreError_base<{
|
|
1087
|
+
readonly operation: OAuthProviderModeTokenStoreOperation;
|
|
1088
|
+
readonly message: string;
|
|
1089
|
+
readonly cause?: unknown;
|
|
1090
|
+
}> {
|
|
1091
|
+
}
|
|
1092
|
+
export interface OAuthProviderModeTokenStoreService {
|
|
1093
|
+
readonly upsert: (record: OAuthProviderModeTokenRecord) => Effect.Effect<void, OAuthProviderModeTokenStoreError>;
|
|
1094
|
+
readonly findByHash: (input: OAuthProviderModeTokenStoreLookupInput) => Effect.Effect<OptionTypes.Option<OAuthProviderModeTokenRecord>, OAuthProviderModeTokenStoreError>;
|
|
1095
|
+
readonly revokeByHash: (input: OAuthProviderModeTokenStoreRevokeInput) => Effect.Effect<OptionTypes.Option<OAuthProviderModeTokenRecord>, OAuthProviderModeTokenStoreError>;
|
|
1096
|
+
readonly rotateRefreshToken: (input: OAuthProviderModeTokenStoreRotateInput) => Effect.Effect<OptionTypes.Option<OAuthProviderModeTokenRecord>, OAuthProviderModeTokenStoreError>;
|
|
1097
|
+
readonly deleteRetired: (input: OAuthProviderModeTokenStoreDeleteRetiredInput) => Effect.Effect<number, OAuthProviderModeTokenStoreError>;
|
|
1098
|
+
}
|
|
1099
|
+
declare const OAuthProviderModeTokenStore_base: Context.ServiceClass<OAuthProviderModeTokenStore, "auth/OAuthProviderModeTokenStore", OAuthProviderModeTokenStoreService>;
|
|
1100
|
+
export declare class OAuthProviderModeTokenStore extends OAuthProviderModeTokenStore_base {
|
|
1101
|
+
}
|
|
1102
|
+
export declare namespace OAuthProviderModeTokenStore {
|
|
1103
|
+
const make: (service: OAuthProviderModeTokenStoreService) => OAuthProviderModeTokenStoreService;
|
|
1104
|
+
}
|
|
1105
|
+
export interface OAuthProviderTokenVaultRecord {
|
|
1106
|
+
readonly accountId: OAuthAccountId;
|
|
1107
|
+
readonly userId: UserId;
|
|
1108
|
+
readonly providerId: OAuthProviderId;
|
|
1109
|
+
readonly providerAccountId: string;
|
|
1110
|
+
readonly accessTokenCiphertext: Redacted.Redacted<string>;
|
|
1111
|
+
readonly refreshTokenCiphertext?: Redacted.Redacted<string>;
|
|
1112
|
+
readonly idTokenCiphertext?: Redacted.Redacted<string>;
|
|
1113
|
+
readonly tokenType: string;
|
|
1114
|
+
readonly scopes?: readonly string[];
|
|
1115
|
+
readonly expiresAt?: UnixMillis;
|
|
1116
|
+
readonly updatedAt: UnixMillis;
|
|
1117
|
+
readonly revokedAt?: UnixMillis;
|
|
1118
|
+
readonly revocationReason?: string;
|
|
1119
|
+
}
|
|
1120
|
+
export interface OAuthProviderTokenVaultTokens {
|
|
1121
|
+
readonly accessTokenCiphertext: Redacted.Redacted<string>;
|
|
1122
|
+
readonly refreshTokenCiphertext?: Redacted.Redacted<string>;
|
|
1123
|
+
readonly idTokenCiphertext?: Redacted.Redacted<string>;
|
|
1124
|
+
readonly tokenType: string;
|
|
1125
|
+
readonly scopes?: readonly string[];
|
|
1126
|
+
readonly expiresAt?: UnixMillis;
|
|
1127
|
+
}
|
|
1128
|
+
export interface OAuthProviderTokenVaultLookupInput {
|
|
1129
|
+
readonly accountId: OAuthAccountId;
|
|
1130
|
+
}
|
|
1131
|
+
export interface OAuthProviderTokenVaultMarkRevokedInput {
|
|
1132
|
+
readonly accountId: OAuthAccountId;
|
|
1133
|
+
readonly revokedAt: UnixMillis;
|
|
1134
|
+
readonly reason: string;
|
|
1135
|
+
}
|
|
1136
|
+
export type OAuthProviderTokenVaultOperation = "upsert" | "refresh-token" | "tokens" | "mark-revoked";
|
|
1137
|
+
declare const OAuthProviderTokenVaultError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
1138
|
+
readonly _tag: "OAuthProviderTokenVaultError";
|
|
1139
|
+
} & Readonly<A>;
|
|
1140
|
+
export declare class OAuthProviderTokenVaultError extends OAuthProviderTokenVaultError_base<{
|
|
1141
|
+
readonly operation: OAuthProviderTokenVaultOperation;
|
|
1142
|
+
readonly message: string;
|
|
1143
|
+
readonly cause?: unknown;
|
|
1144
|
+
}> {
|
|
1145
|
+
}
|
|
1146
|
+
export interface OAuthProviderTokenVaultService {
|
|
1147
|
+
readonly upsert: (record: OAuthProviderTokenVaultRecord) => Effect.Effect<void, OAuthProviderTokenVaultError>;
|
|
1148
|
+
readonly refreshTokenForAccount: (input: OAuthProviderTokenVaultLookupInput) => Effect.Effect<OptionTypes.Option<Redacted.Redacted<string>>, OAuthProviderTokenVaultError>;
|
|
1149
|
+
readonly tokensForAccount: (input: OAuthProviderTokenVaultLookupInput) => Effect.Effect<OptionTypes.Option<OAuthProviderTokenVaultTokens>, OAuthProviderTokenVaultError>;
|
|
1150
|
+
readonly markRevoked: (input: OAuthProviderTokenVaultMarkRevokedInput) => Effect.Effect<OptionTypes.Option<OAuthProviderTokenVaultRecord>, OAuthProviderTokenVaultError>;
|
|
1151
|
+
}
|
|
1152
|
+
declare const OAuthProviderTokenVault_base: Context.ServiceClass<OAuthProviderTokenVault, "auth/OAuthProviderTokenVault", OAuthProviderTokenVaultService>;
|
|
1153
|
+
export declare class OAuthProviderTokenVault extends OAuthProviderTokenVault_base {
|
|
1154
|
+
}
|
|
1155
|
+
export declare namespace OAuthProviderTokenVault {
|
|
1156
|
+
const make: (service: OAuthProviderTokenVaultService) => OAuthProviderTokenVaultService;
|
|
1157
|
+
}
|
|
1158
|
+
export interface OAuthProviderTokenLifecycleStoreInput {
|
|
1159
|
+
readonly accountId: OAuthAccountId;
|
|
1160
|
+
readonly userId: UserId;
|
|
1161
|
+
readonly providerId: OAuthProviderId;
|
|
1162
|
+
readonly providerAccountId: string;
|
|
1163
|
+
readonly tokens: OAuthTokenResponse;
|
|
1164
|
+
readonly fallbackRefreshTokenCiphertext?: Redacted.Redacted<string>;
|
|
1165
|
+
readonly now?: UnixMillis;
|
|
1166
|
+
}
|
|
1167
|
+
export interface OAuthProviderTokenLifecycleStoreResult {
|
|
1168
|
+
readonly accountId: OAuthAccountId;
|
|
1169
|
+
readonly expiresAt?: UnixMillis;
|
|
1170
|
+
readonly hasRefreshToken: boolean;
|
|
1171
|
+
readonly scopes: readonly string[];
|
|
1172
|
+
}
|
|
1173
|
+
export interface OAuthProviderTokenLifecycleRefreshInput {
|
|
1174
|
+
readonly accountId: OAuthAccountId;
|
|
1175
|
+
readonly userId: UserId;
|
|
1176
|
+
readonly providerId: OAuthProviderId;
|
|
1177
|
+
readonly providerAccountId: string;
|
|
1178
|
+
readonly provider: OAuthProviderConfig;
|
|
1179
|
+
readonly now?: UnixMillis;
|
|
1180
|
+
readonly scopes?: readonly string[];
|
|
1181
|
+
readonly clientAuthentication?: OAuthClientAuthentication;
|
|
1182
|
+
readonly params?: Readonly<Record<string, string>>;
|
|
1183
|
+
}
|
|
1184
|
+
export type OAuthProviderTokenLifecycleRefreshResult = {
|
|
1185
|
+
readonly status: "missing-refresh-token";
|
|
1186
|
+
readonly accountId: OAuthAccountId;
|
|
1187
|
+
} | ({
|
|
1188
|
+
readonly status: "refreshed";
|
|
1189
|
+
} & OAuthProviderTokenLifecycleStoreResult);
|
|
1190
|
+
export interface OAuthProviderTokenLifecycleRevokeInput {
|
|
1191
|
+
readonly accountId: OAuthAccountId;
|
|
1192
|
+
readonly provider: OAuthProviderConfig;
|
|
1193
|
+
readonly reason: string;
|
|
1194
|
+
readonly now?: UnixMillis;
|
|
1195
|
+
readonly clientAuthentication?: OAuthClientAuthentication;
|
|
1196
|
+
readonly params?: Readonly<Record<string, string>>;
|
|
1197
|
+
}
|
|
1198
|
+
export type OAuthProviderTokenLifecycleRevokeResult = {
|
|
1199
|
+
readonly status: "missing-tokens";
|
|
1200
|
+
readonly accountId: OAuthAccountId;
|
|
1201
|
+
} | {
|
|
1202
|
+
readonly status: "revoked";
|
|
1203
|
+
readonly accountId: OAuthAccountId;
|
|
1204
|
+
readonly revokedAt: UnixMillis;
|
|
1205
|
+
};
|
|
1206
|
+
export type OAuthProviderTokenLifecycleOperation = "store" | "refresh" | "revoke";
|
|
1207
|
+
declare const OAuthProviderTokenLifecycleError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
1208
|
+
readonly _tag: "OAuthProviderTokenLifecycleError";
|
|
1209
|
+
} & Readonly<A>;
|
|
1210
|
+
export declare class OAuthProviderTokenLifecycleError extends OAuthProviderTokenLifecycleError_base<{
|
|
1211
|
+
readonly operation: OAuthProviderTokenLifecycleOperation;
|
|
1212
|
+
readonly message: string;
|
|
1213
|
+
readonly cause?: unknown;
|
|
1214
|
+
}> {
|
|
1215
|
+
}
|
|
1216
|
+
export interface OAuthProviderTokenLifecycleService {
|
|
1217
|
+
readonly store: (input: OAuthProviderTokenLifecycleStoreInput) => Effect.Effect<OAuthProviderTokenLifecycleStoreResult, OAuthProviderTokenLifecycleError>;
|
|
1218
|
+
readonly refresh: (input: OAuthProviderTokenLifecycleRefreshInput) => Effect.Effect<OAuthProviderTokenLifecycleRefreshResult, OAuthProviderTokenLifecycleError>;
|
|
1219
|
+
readonly revoke: (input: OAuthProviderTokenLifecycleRevokeInput) => Effect.Effect<OAuthProviderTokenLifecycleRevokeResult, OAuthProviderTokenLifecycleError>;
|
|
1220
|
+
}
|
|
1221
|
+
declare const OAuthProviderTokenLifecycle_base: Context.ServiceClass<OAuthProviderTokenLifecycle, "auth/OAuthProviderTokenLifecycle", OAuthProviderTokenLifecycleService>;
|
|
1222
|
+
export declare class OAuthProviderTokenLifecycle extends OAuthProviderTokenLifecycle_base {
|
|
1223
|
+
}
|
|
1224
|
+
export declare namespace OAuthProviderTokenLifecycle {
|
|
1225
|
+
const make: (service: OAuthProviderTokenLifecycleService) => OAuthProviderTokenLifecycleService;
|
|
1226
|
+
}
|
|
1227
|
+
export interface OAuthProviderTokenLifecycleDependencies {
|
|
1228
|
+
readonly tokenVault: OAuthProviderTokenVaultService;
|
|
1229
|
+
readonly encryptToken: (token: Redacted.Redacted<string>) => Effect.Effect<Redacted.Redacted<string>, unknown>;
|
|
1230
|
+
readonly decryptToken: (ciphertext: Redacted.Redacted<string>) => Effect.Effect<Redacted.Redacted<string>, unknown>;
|
|
1231
|
+
readonly request: (request: OAuthTokenRequest) => Effect.Effect<unknown, unknown>;
|
|
1232
|
+
}
|
|
1233
|
+
export type OAuthProviderTokenLifecycleLiveOptions = Omit<OAuthProviderTokenLifecycleDependencies, "tokenVault">;
|
|
1234
|
+
export interface GoogleOidcProviderTokenRefreshInput {
|
|
1235
|
+
readonly accountId: OAuthAccountId;
|
|
1236
|
+
readonly userId: UserId;
|
|
1237
|
+
readonly providerAccountId: string;
|
|
1238
|
+
readonly provider: OAuthProviderConfig;
|
|
1239
|
+
readonly now?: UnixMillis;
|
|
1240
|
+
readonly scopes?: readonly string[];
|
|
1241
|
+
readonly clientSecret?: Redacted.Redacted<string>;
|
|
1242
|
+
readonly params?: Readonly<Record<string, string>>;
|
|
1243
|
+
}
|
|
1244
|
+
export interface GoogleOidcProviderTokenRevokeInput {
|
|
1245
|
+
readonly accountId: OAuthAccountId;
|
|
1246
|
+
readonly provider: OAuthProviderConfig;
|
|
1247
|
+
readonly reason: string;
|
|
1248
|
+
readonly now?: UnixMillis;
|
|
1249
|
+
readonly clientSecret?: Redacted.Redacted<string>;
|
|
1250
|
+
readonly params?: Readonly<Record<string, string>>;
|
|
1251
|
+
}
|
|
1252
|
+
export interface MicrosoftOidcProviderTokenRefreshInput {
|
|
1253
|
+
readonly accountId: OAuthAccountId;
|
|
1254
|
+
readonly userId: UserId;
|
|
1255
|
+
readonly providerAccountId: string;
|
|
1256
|
+
readonly provider: OAuthProviderConfig;
|
|
1257
|
+
readonly now?: UnixMillis;
|
|
1258
|
+
readonly scopes?: readonly string[];
|
|
1259
|
+
readonly clientSecret?: Redacted.Redacted<string>;
|
|
1260
|
+
readonly params?: Readonly<Record<string, string>>;
|
|
1261
|
+
}
|
|
1262
|
+
export interface AppleSignInProviderTokenRefreshInput {
|
|
1263
|
+
readonly accountId: OAuthAccountId;
|
|
1264
|
+
readonly userId: UserId;
|
|
1265
|
+
readonly providerAccountId: string;
|
|
1266
|
+
readonly provider: OAuthProviderConfig;
|
|
1267
|
+
readonly clientSecret: Redacted.Redacted<string>;
|
|
1268
|
+
readonly now?: UnixMillis;
|
|
1269
|
+
readonly scopes?: readonly string[];
|
|
1270
|
+
readonly params?: Readonly<Record<string, string>>;
|
|
1271
|
+
}
|
|
1272
|
+
export interface AppleSignInProviderTokenRevokeInput {
|
|
1273
|
+
readonly accountId: OAuthAccountId;
|
|
1274
|
+
readonly provider: OAuthProviderConfig;
|
|
1275
|
+
readonly reason: string;
|
|
1276
|
+
readonly clientSecret: Redacted.Redacted<string>;
|
|
1277
|
+
readonly now?: UnixMillis;
|
|
1278
|
+
readonly params?: Readonly<Record<string, string>>;
|
|
1279
|
+
}
|
|
1280
|
+
export interface OidcIdTokenClaims extends JwtClaims {
|
|
1281
|
+
readonly iss: string;
|
|
1282
|
+
readonly sub: string;
|
|
1283
|
+
readonly aud: JwtAudience;
|
|
1284
|
+
readonly exp: number;
|
|
1285
|
+
readonly iat: number;
|
|
1286
|
+
readonly nonce?: string;
|
|
1287
|
+
readonly azp?: string;
|
|
1288
|
+
readonly email?: string;
|
|
1289
|
+
readonly email_verified?: boolean;
|
|
1290
|
+
readonly name?: string;
|
|
1291
|
+
readonly preferred_username?: string;
|
|
1292
|
+
readonly picture?: string;
|
|
1293
|
+
}
|
|
1294
|
+
export type OidcIdTokenVerificationFailureReason = JwtVerificationFailureReason | "missing_provider_issuer" | "missing_subject" | "missing_expiration" | "missing_issued_at" | "missing_authorized_party" | "authorized_party_mismatch" | "nonce_mismatch";
|
|
1295
|
+
export interface OidcIdTokenVerifyInput {
|
|
1296
|
+
readonly provider: OAuthProviderConfig;
|
|
1297
|
+
readonly idToken: Redacted.Redacted<OAuthIdToken | string>;
|
|
1298
|
+
readonly nonce?: OAuthNonce | string;
|
|
1299
|
+
readonly audience?: JwtAudience;
|
|
1300
|
+
readonly authorizedParty?: string;
|
|
1301
|
+
readonly now?: UnixMillis;
|
|
1302
|
+
readonly clockTolerance?: Duration.Duration;
|
|
1303
|
+
}
|
|
1304
|
+
export type OidcIdTokenVerificationResult = {
|
|
1305
|
+
readonly valid: true;
|
|
1306
|
+
readonly header: JwtHeader;
|
|
1307
|
+
readonly claims: OidcIdTokenClaims;
|
|
1308
|
+
readonly key: JwtKeyInfo;
|
|
1309
|
+
} | {
|
|
1310
|
+
readonly valid: false;
|
|
1311
|
+
readonly reason: OidcIdTokenVerificationFailureReason;
|
|
1312
|
+
};
|
|
1313
|
+
export type OidcIdTokenVerifierOperation = "verify";
|
|
1314
|
+
declare const OidcIdTokenVerifierError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
1315
|
+
readonly _tag: "OidcIdTokenVerifierError";
|
|
1316
|
+
} & Readonly<A>;
|
|
1317
|
+
export declare class OidcIdTokenVerifierError extends OidcIdTokenVerifierError_base<{
|
|
1318
|
+
readonly operation: OidcIdTokenVerifierOperation;
|
|
1319
|
+
readonly message: string;
|
|
1320
|
+
readonly cause?: unknown;
|
|
1321
|
+
}> {
|
|
1322
|
+
}
|
|
1323
|
+
export interface OidcIdTokenVerifierService {
|
|
1324
|
+
readonly verify: (input: OidcIdTokenVerifyInput) => Effect.Effect<OidcIdTokenVerificationResult, OidcIdTokenVerifierError>;
|
|
1325
|
+
}
|
|
1326
|
+
declare const OidcIdTokenVerifier_base: Context.ServiceClass<OidcIdTokenVerifier, "auth/OidcIdTokenVerifier", OidcIdTokenVerifierService>;
|
|
1327
|
+
export declare class OidcIdTokenVerifier extends OidcIdTokenVerifier_base {
|
|
1328
|
+
}
|
|
1329
|
+
export declare namespace OidcIdTokenVerifier {
|
|
1330
|
+
const make: (service: OidcIdTokenVerifierService) => OidcIdTokenVerifierService;
|
|
1331
|
+
}
|
|
1332
|
+
export interface OidcIdTokenVerifierDependencies {
|
|
1333
|
+
readonly jwtVerifier: JwtVerifierService;
|
|
1334
|
+
}
|
|
1335
|
+
export interface OAuthProfile {
|
|
1336
|
+
readonly providerId: OAuthProviderId;
|
|
1337
|
+
readonly providerAccountId: string;
|
|
1338
|
+
readonly email?: Email;
|
|
1339
|
+
readonly emailVerified?: boolean;
|
|
1340
|
+
readonly name?: string;
|
|
1341
|
+
readonly username?: string;
|
|
1342
|
+
readonly avatarUrl?: string;
|
|
1343
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
1344
|
+
}
|
|
1345
|
+
export interface OAuthProfileNormalizeInput {
|
|
1346
|
+
readonly provider: OAuthProviderConfig;
|
|
1347
|
+
readonly claims?: OidcIdTokenClaims;
|
|
1348
|
+
readonly userInfo?: unknown;
|
|
1349
|
+
readonly profile?: unknown;
|
|
1350
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
1351
|
+
}
|
|
1352
|
+
export type OAuthProfileNormalizationFailureReason = "missing_claims" | "missing_subject" | "invalid_userinfo" | "subject_mismatch";
|
|
1353
|
+
export type OAuthProfileNormalizationOperation = "normalize";
|
|
1354
|
+
declare const OAuthProfileNormalizationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
1355
|
+
readonly _tag: "OAuthProfileNormalizationError";
|
|
1356
|
+
} & Readonly<A>;
|
|
1357
|
+
export declare class OAuthProfileNormalizationError extends OAuthProfileNormalizationError_base<{
|
|
1358
|
+
readonly operation: OAuthProfileNormalizationOperation;
|
|
1359
|
+
readonly reason: OAuthProfileNormalizationFailureReason;
|
|
1360
|
+
readonly message: string;
|
|
1361
|
+
readonly cause?: unknown;
|
|
1362
|
+
}> {
|
|
1363
|
+
}
|
|
1364
|
+
export interface OAuthProfileNormalizerService {
|
|
1365
|
+
readonly normalize: (input: OAuthProfileNormalizeInput) => Effect.Effect<OAuthProfile, OAuthProfileNormalizationError>;
|
|
1366
|
+
}
|
|
1367
|
+
declare const OAuthProfileNormalizer_base: Context.ServiceClass<OAuthProfileNormalizer, "auth/OAuthProfileNormalizer", OAuthProfileNormalizerService>;
|
|
1368
|
+
export declare class OAuthProfileNormalizer extends OAuthProfileNormalizer_base {
|
|
1369
|
+
}
|
|
1370
|
+
export declare namespace OAuthProfileNormalizer {
|
|
1371
|
+
const make: (service: OAuthProfileNormalizerService) => OAuthProfileNormalizerService;
|
|
1372
|
+
}
|
|
1373
|
+
export type OAuthTokenExchangeOperation = "token-request" | "refresh-token-request" | "revocation-request" | "decode-token-response" | "exchange-code";
|
|
1374
|
+
declare const OAuthTokenExchangeError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
1375
|
+
readonly _tag: "OAuthTokenExchangeError";
|
|
1376
|
+
} & Readonly<A>;
|
|
1377
|
+
export declare class OAuthTokenExchangeError extends OAuthTokenExchangeError_base<{
|
|
1378
|
+
readonly operation: OAuthTokenExchangeOperation;
|
|
1379
|
+
readonly message: string;
|
|
1380
|
+
readonly cause?: unknown;
|
|
1381
|
+
}> {
|
|
1382
|
+
}
|
|
1383
|
+
export interface OAuthTokenExchangeService {
|
|
1384
|
+
readonly exchangeAuthorizationCode: (input: OAuthAuthorizationCodeTokenInput) => Effect.Effect<OAuthTokenResponse, OAuthTokenExchangeError>;
|
|
1385
|
+
}
|
|
1386
|
+
declare const OAuthTokenExchange_base: Context.ServiceClass<OAuthTokenExchange, "auth/OAuthTokenExchange", OAuthTokenExchangeService>;
|
|
1387
|
+
export declare class OAuthTokenExchange extends OAuthTokenExchange_base {
|
|
1388
|
+
}
|
|
1389
|
+
export declare namespace OAuthTokenExchange {
|
|
1390
|
+
const make: (service: OAuthTokenExchangeService) => OAuthTokenExchangeService;
|
|
1391
|
+
}
|
|
1392
|
+
export interface OAuthTokenExchangeDependencies {
|
|
1393
|
+
readonly request: (request: OAuthTokenRequest) => Effect.Effect<unknown, OAuthTokenExchangeError>;
|
|
1394
|
+
}
|
|
1395
|
+
declare const OAuthProviders_base: Context.ServiceClass<OAuthProviders, "auth/OAuthProviders", OAuthProvidersService>;
|
|
1396
|
+
export declare class OAuthProviders extends OAuthProviders_base {
|
|
1397
|
+
}
|
|
1398
|
+
export declare namespace OAuthProviders {
|
|
1399
|
+
const make: (service: OAuthProvidersService) => OAuthProvidersService;
|
|
1400
|
+
}
|
|
1401
|
+
export interface OAuthPkce {
|
|
1402
|
+
readonly codeVerifier: Redacted.Redacted<OAuthCodeVerifier>;
|
|
1403
|
+
readonly codeChallenge: OAuthCodeChallenge;
|
|
1404
|
+
readonly codeChallengeMethod: "S256";
|
|
1405
|
+
}
|
|
1406
|
+
export interface OAuthPkceInput {
|
|
1407
|
+
readonly codeVerifier?: Redacted.Redacted<string>;
|
|
1408
|
+
readonly verifierBytes?: number;
|
|
1409
|
+
}
|
|
1410
|
+
export interface OAuthAuthorizationStartInput {
|
|
1411
|
+
readonly provider: OAuthProviderConfig;
|
|
1412
|
+
readonly ttl?: Duration.Duration;
|
|
1413
|
+
readonly redirectUri?: string;
|
|
1414
|
+
readonly scopes?: readonly string[];
|
|
1415
|
+
readonly authorizationParams?: Readonly<Record<string, string>>;
|
|
1416
|
+
readonly codeVerifier?: Redacted.Redacted<string>;
|
|
1417
|
+
readonly includeNonce?: boolean;
|
|
1418
|
+
readonly nonce?: string;
|
|
1419
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
1420
|
+
}
|
|
1421
|
+
export interface StartedOAuthAuthorization {
|
|
1422
|
+
readonly providerId: OAuthProviderId;
|
|
1423
|
+
readonly authorizationUrl: string;
|
|
1424
|
+
readonly state: OAuthStateToken;
|
|
1425
|
+
readonly challengeId: ChallengeId;
|
|
1426
|
+
readonly expiresAt: UnixMillis;
|
|
1427
|
+
readonly codeVerifier: Redacted.Redacted<OAuthCodeVerifier>;
|
|
1428
|
+
readonly codeChallenge: OAuthCodeChallenge;
|
|
1429
|
+
readonly codeChallengeMethod: "S256";
|
|
1430
|
+
readonly nonce?: OAuthNonce;
|
|
1431
|
+
readonly redirectUri: string;
|
|
1432
|
+
readonly scopes: readonly string[];
|
|
1433
|
+
}
|
|
1434
|
+
export interface OAuthStateVerifyInput {
|
|
1435
|
+
readonly state: OAuthStateToken | string;
|
|
1436
|
+
}
|
|
1437
|
+
export interface VerifiedOAuthState {
|
|
1438
|
+
readonly challengeId: ChallengeId;
|
|
1439
|
+
readonly providerId: OAuthProviderId;
|
|
1440
|
+
readonly redirectUri?: string;
|
|
1441
|
+
readonly scopes: readonly string[];
|
|
1442
|
+
readonly codeChallenge?: OAuthCodeChallenge;
|
|
1443
|
+
readonly nonce?: OAuthNonce;
|
|
1444
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
1445
|
+
}
|
|
1446
|
+
export interface OAuthCallbackInput {
|
|
1447
|
+
readonly provider: OAuthProviderConfig;
|
|
1448
|
+
readonly state: OAuthStateToken | string;
|
|
1449
|
+
readonly code: OAuthAuthorizationCode | string;
|
|
1450
|
+
readonly codeVerifier: Redacted.Redacted<OAuthCodeVerifier | string>;
|
|
1451
|
+
readonly redirectUri?: string;
|
|
1452
|
+
readonly clientAuthentication?: OAuthClientAuthentication;
|
|
1453
|
+
readonly tokenParams?: Readonly<Record<string, string>>;
|
|
1454
|
+
}
|
|
1455
|
+
export interface OAuthCallbackResult {
|
|
1456
|
+
readonly state: VerifiedOAuthState;
|
|
1457
|
+
readonly tokens: OAuthTokenResponse;
|
|
1458
|
+
}
|
|
1459
|
+
export type OAuthStateOperation = "start" | "verify" | "parse" | "pkce" | "authorization-url";
|
|
1460
|
+
declare const OAuthStateError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
1461
|
+
readonly _tag: "OAuthStateError";
|
|
1462
|
+
} & Readonly<A>;
|
|
1463
|
+
export declare class OAuthStateError extends OAuthStateError_base<{
|
|
1464
|
+
readonly operation: OAuthStateOperation;
|
|
1465
|
+
readonly message: string;
|
|
1466
|
+
readonly cause?: unknown;
|
|
1467
|
+
}> {
|
|
1468
|
+
}
|
|
1469
|
+
export interface OAuthStateService {
|
|
1470
|
+
readonly start: (input: OAuthAuthorizationStartInput) => Effect.Effect<StartedOAuthAuthorization, OAuthStateError>;
|
|
1471
|
+
readonly verify: (input: OAuthStateVerifyInput) => Effect.Effect<VerifiedOAuthState, OAuthStateError>;
|
|
1472
|
+
}
|
|
1473
|
+
declare const OAuthState_base: Context.ServiceClass<OAuthState, "auth/OAuthState", OAuthStateService>;
|
|
1474
|
+
export declare class OAuthState extends OAuthState_base {
|
|
1475
|
+
}
|
|
1476
|
+
export declare namespace OAuthState {
|
|
1477
|
+
const make: (service: OAuthStateService) => OAuthStateService;
|
|
1478
|
+
}
|
|
1479
|
+
export interface OAuthAccountRecord {
|
|
1480
|
+
readonly id: OAuthAccountId;
|
|
1481
|
+
readonly providerId: OAuthProviderId;
|
|
1482
|
+
readonly providerAccountId: string;
|
|
1483
|
+
readonly userId: UserId;
|
|
1484
|
+
readonly email?: Email;
|
|
1485
|
+
readonly emailVerified?: boolean;
|
|
1486
|
+
readonly createdAt: UnixMillis;
|
|
1487
|
+
readonly updatedAt: UnixMillis;
|
|
1488
|
+
readonly unlinkedAt?: UnixMillis;
|
|
1489
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
1490
|
+
}
|
|
1491
|
+
export interface VerifiedOAuthIdentity {
|
|
1492
|
+
readonly providerId: OAuthProviderId;
|
|
1493
|
+
readonly providerAccountId: string;
|
|
1494
|
+
readonly email?: Email;
|
|
1495
|
+
readonly emailVerified?: boolean;
|
|
1496
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
1497
|
+
}
|
|
1498
|
+
export interface OAuthAccountLookupInput {
|
|
1499
|
+
readonly providerId: OAuthProviderId;
|
|
1500
|
+
readonly providerAccountId: string;
|
|
1501
|
+
readonly includeUnlinked?: boolean;
|
|
1502
|
+
}
|
|
1503
|
+
export interface OAuthAccountListByUserInput {
|
|
1504
|
+
readonly userId: UserId;
|
|
1505
|
+
readonly includeUnlinked?: boolean;
|
|
1506
|
+
}
|
|
1507
|
+
export interface OAuthAccountUnlinkInput {
|
|
1508
|
+
readonly providerId: OAuthProviderId;
|
|
1509
|
+
readonly providerAccountId: string;
|
|
1510
|
+
readonly unlinkedAt: UnixMillis;
|
|
1511
|
+
readonly reason?: string;
|
|
1512
|
+
}
|
|
1513
|
+
export type OAuthAccountStoreOperation = "insert" | "find" | "list" | "unlink";
|
|
1514
|
+
declare const OAuthAccountStoreError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
1515
|
+
readonly _tag: "OAuthAccountStoreError";
|
|
1516
|
+
} & Readonly<A>;
|
|
1517
|
+
export declare class OAuthAccountStoreError extends OAuthAccountStoreError_base<{
|
|
1518
|
+
readonly operation: OAuthAccountStoreOperation;
|
|
1519
|
+
readonly message: string;
|
|
1520
|
+
readonly cause?: unknown;
|
|
1521
|
+
}> {
|
|
1522
|
+
}
|
|
1523
|
+
export interface OAuthAccountStoreService {
|
|
1524
|
+
readonly insert: (row: OAuthAccountRecord) => Effect.Effect<void, OAuthAccountStoreError>;
|
|
1525
|
+
readonly findById: (id: OAuthAccountId) => Effect.Effect<OptionTypes.Option<OAuthAccountRecord>, OAuthAccountStoreError>;
|
|
1526
|
+
readonly findByProviderAccount: (input: OAuthAccountLookupInput) => Effect.Effect<OptionTypes.Option<OAuthAccountRecord>, OAuthAccountStoreError>;
|
|
1527
|
+
readonly listByUser: (input: OAuthAccountListByUserInput) => Effect.Effect<readonly OAuthAccountRecord[], OAuthAccountStoreError>;
|
|
1528
|
+
readonly unlink: (input: OAuthAccountUnlinkInput) => Effect.Effect<OptionTypes.Option<OAuthAccountRecord>, OAuthAccountStoreError>;
|
|
1529
|
+
}
|
|
1530
|
+
declare const OAuthAccountStore_base: Context.ServiceClass<OAuthAccountStore, "auth/OAuthAccountStore", OAuthAccountStoreService>;
|
|
1531
|
+
export declare class OAuthAccountStore extends OAuthAccountStore_base {
|
|
1532
|
+
}
|
|
1533
|
+
export declare namespace OAuthAccountStore {
|
|
1534
|
+
const make: (service: OAuthAccountStoreService) => OAuthAccountStoreService;
|
|
1535
|
+
}
|
|
1536
|
+
export interface OAuthAccountLinkingResolveInput {
|
|
1537
|
+
readonly identity: VerifiedOAuthIdentity;
|
|
1538
|
+
readonly currentUserId?: UserId;
|
|
1539
|
+
readonly matchedUserId?: UserId;
|
|
1540
|
+
}
|
|
1541
|
+
export type OAuthAccountLinkingResolution = {
|
|
1542
|
+
readonly type: "sign-in";
|
|
1543
|
+
readonly reason: "linked-account";
|
|
1544
|
+
readonly userId: UserId;
|
|
1545
|
+
readonly account: OAuthAccountRecord;
|
|
1546
|
+
} | {
|
|
1547
|
+
readonly type: "link-existing-user";
|
|
1548
|
+
readonly reason: "current-user" | "verified-email";
|
|
1549
|
+
readonly userId: UserId;
|
|
1550
|
+
readonly identity: VerifiedOAuthIdentity;
|
|
1551
|
+
} | {
|
|
1552
|
+
readonly type: "require-explicit-linking";
|
|
1553
|
+
readonly reason: "matched-email" | "unverified-email" | "no-linked-account";
|
|
1554
|
+
readonly identity: VerifiedOAuthIdentity;
|
|
1555
|
+
readonly matchedUserId?: UserId;
|
|
1556
|
+
} | {
|
|
1557
|
+
readonly type: "deny";
|
|
1558
|
+
readonly reason: "provider-account-linked-to-different-user";
|
|
1559
|
+
readonly identity: VerifiedOAuthIdentity;
|
|
1560
|
+
readonly account: OAuthAccountRecord;
|
|
1561
|
+
readonly currentUserId: UserId;
|
|
1562
|
+
};
|
|
1563
|
+
export type OAuthAccountLinkingOperation = "resolve";
|
|
1564
|
+
declare const OAuthAccountLinkingError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
1565
|
+
readonly _tag: "OAuthAccountLinkingError";
|
|
1566
|
+
} & Readonly<A>;
|
|
1567
|
+
export declare class OAuthAccountLinkingError extends OAuthAccountLinkingError_base<{
|
|
1568
|
+
readonly operation: OAuthAccountLinkingOperation;
|
|
1569
|
+
readonly message: string;
|
|
1570
|
+
readonly cause?: unknown;
|
|
1571
|
+
}> {
|
|
1572
|
+
}
|
|
1573
|
+
export interface OAuthAccountLinkingService {
|
|
1574
|
+
readonly resolve: (input: OAuthAccountLinkingResolveInput) => Effect.Effect<OAuthAccountLinkingResolution, OAuthAccountLinkingError>;
|
|
1575
|
+
}
|
|
1576
|
+
declare const OAuthAccountLinking_base: Context.ServiceClass<OAuthAccountLinking, "auth/OAuthAccountLinking", OAuthAccountLinkingService>;
|
|
1577
|
+
export declare class OAuthAccountLinking extends OAuthAccountLinking_base {
|
|
1578
|
+
}
|
|
1579
|
+
export declare namespace OAuthAccountLinking {
|
|
1580
|
+
const make: (service: OAuthAccountLinkingService) => OAuthAccountLinkingService;
|
|
1581
|
+
}
|
|
1582
|
+
export interface OAuthAccountLinkingPolicyOptions {
|
|
1583
|
+
readonly autoLinkVerifiedEmail?: boolean;
|
|
1584
|
+
}
|
|
1585
|
+
export interface OAuthAccountLinkingPolicyDependencies extends OAuthAccountLinkingPolicyOptions {
|
|
1586
|
+
readonly accounts: OAuthAccountStoreService;
|
|
1587
|
+
}
|
|
1588
|
+
export interface OAuthAccountUnlinkingResolveInput {
|
|
1589
|
+
readonly userId: UserId;
|
|
1590
|
+
readonly providerId: OAuthProviderId;
|
|
1591
|
+
readonly providerAccountId: string;
|
|
1592
|
+
readonly stepUpSatisfied?: boolean;
|
|
1593
|
+
}
|
|
1594
|
+
export type OAuthAccountUnlinkingResolution = {
|
|
1595
|
+
readonly type: "allow";
|
|
1596
|
+
readonly reason: "owned-account";
|
|
1597
|
+
readonly userId: UserId;
|
|
1598
|
+
readonly account: OAuthAccountRecord;
|
|
1599
|
+
readonly remainingAccounts: readonly OAuthAccountRecord[];
|
|
1600
|
+
} | {
|
|
1601
|
+
readonly type: "requires-step-up";
|
|
1602
|
+
readonly reason: "step-up-required";
|
|
1603
|
+
readonly userId: UserId;
|
|
1604
|
+
readonly account: OAuthAccountRecord;
|
|
1605
|
+
readonly remainingAccounts: readonly OAuthAccountRecord[];
|
|
1606
|
+
} | {
|
|
1607
|
+
readonly type: "deny-not-found";
|
|
1608
|
+
readonly reason: "provider-account-not-found";
|
|
1609
|
+
readonly userId: UserId;
|
|
1610
|
+
readonly providerId: OAuthProviderId;
|
|
1611
|
+
readonly providerAccountId: string;
|
|
1612
|
+
} | {
|
|
1613
|
+
readonly type: "deny-not-owner";
|
|
1614
|
+
readonly reason: "provider-account-linked-to-different-user";
|
|
1615
|
+
readonly userId: UserId;
|
|
1616
|
+
readonly account: OAuthAccountRecord;
|
|
1617
|
+
} | {
|
|
1618
|
+
readonly type: "deny-last-account";
|
|
1619
|
+
readonly reason: "last-linked-account";
|
|
1620
|
+
readonly userId: UserId;
|
|
1621
|
+
readonly account: OAuthAccountRecord;
|
|
1622
|
+
};
|
|
1623
|
+
export type OAuthAccountUnlinkingOperation = "resolve";
|
|
1624
|
+
declare const OAuthAccountUnlinkingError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
1625
|
+
readonly _tag: "OAuthAccountUnlinkingError";
|
|
1626
|
+
} & Readonly<A>;
|
|
1627
|
+
export declare class OAuthAccountUnlinkingError extends OAuthAccountUnlinkingError_base<{
|
|
1628
|
+
readonly operation: OAuthAccountUnlinkingOperation;
|
|
1629
|
+
readonly message: string;
|
|
1630
|
+
readonly cause?: unknown;
|
|
1631
|
+
}> {
|
|
1632
|
+
}
|
|
1633
|
+
export interface OAuthAccountUnlinkingService {
|
|
1634
|
+
readonly resolve: (input: OAuthAccountUnlinkingResolveInput) => Effect.Effect<OAuthAccountUnlinkingResolution, OAuthAccountUnlinkingError>;
|
|
1635
|
+
}
|
|
1636
|
+
declare const OAuthAccountUnlinking_base: Context.ServiceClass<OAuthAccountUnlinking, "auth/OAuthAccountUnlinking", OAuthAccountUnlinkingService>;
|
|
1637
|
+
export declare class OAuthAccountUnlinking extends OAuthAccountUnlinking_base {
|
|
1638
|
+
}
|
|
1639
|
+
export declare namespace OAuthAccountUnlinking {
|
|
1640
|
+
const make: (service: OAuthAccountUnlinkingService) => OAuthAccountUnlinkingService;
|
|
1641
|
+
}
|
|
1642
|
+
export interface OAuthAccountUnlinkingPolicyOptions {
|
|
1643
|
+
readonly allowLastAccount?: boolean;
|
|
1644
|
+
readonly requireStepUp?: boolean;
|
|
1645
|
+
}
|
|
1646
|
+
export interface OAuthAccountUnlinkingPolicyDependencies extends OAuthAccountUnlinkingPolicyOptions {
|
|
1647
|
+
readonly accounts: OAuthAccountStoreService;
|
|
1648
|
+
}
|
|
1649
|
+
export type OAuthLinkConfirmationReason = "current-user" | "matched-email" | "unverified-email" | "no-linked-account" | "manual" | (string & {});
|
|
1650
|
+
export interface OAuthLinkConfirmationStartInput {
|
|
1651
|
+
readonly userId: UserId;
|
|
1652
|
+
readonly identity: VerifiedOAuthIdentity;
|
|
1653
|
+
readonly reason?: OAuthLinkConfirmationReason;
|
|
1654
|
+
readonly ttl?: Duration.Duration;
|
|
1655
|
+
readonly secret?: Redacted.Redacted<string>;
|
|
1656
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
1657
|
+
}
|
|
1658
|
+
export interface StartedOAuthLinkConfirmation {
|
|
1659
|
+
readonly challengeId: ChallengeId;
|
|
1660
|
+
readonly userId: UserId;
|
|
1661
|
+
readonly identity: VerifiedOAuthIdentity;
|
|
1662
|
+
readonly reason: OAuthLinkConfirmationReason;
|
|
1663
|
+
readonly secret: Redacted.Redacted<string>;
|
|
1664
|
+
readonly expiresAt: UnixMillis;
|
|
1665
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
1666
|
+
}
|
|
1667
|
+
export interface OAuthLinkConfirmationInspectInput {
|
|
1668
|
+
readonly challengeId: ChallengeId;
|
|
1669
|
+
readonly secret?: Redacted.Redacted<string>;
|
|
1670
|
+
}
|
|
1671
|
+
export interface PendingOAuthLinkConfirmation {
|
|
1672
|
+
readonly challengeId: ChallengeId;
|
|
1673
|
+
readonly userId: UserId;
|
|
1674
|
+
readonly identity: VerifiedOAuthIdentity;
|
|
1675
|
+
readonly reason: OAuthLinkConfirmationReason;
|
|
1676
|
+
readonly expiresAt: UnixMillis;
|
|
1677
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
1678
|
+
}
|
|
1679
|
+
export interface OAuthLinkConfirmationConfirmInput {
|
|
1680
|
+
readonly challengeId: ChallengeId;
|
|
1681
|
+
readonly secret?: Redacted.Redacted<string>;
|
|
1682
|
+
readonly currentUserId?: UserId;
|
|
1683
|
+
readonly expectedProviderId?: OAuthProviderId;
|
|
1684
|
+
readonly expectedProviderAccountId?: string;
|
|
1685
|
+
}
|
|
1686
|
+
export interface ConfirmedOAuthLinkConfirmation {
|
|
1687
|
+
readonly challengeId: ChallengeId;
|
|
1688
|
+
readonly userId: UserId;
|
|
1689
|
+
readonly identity: VerifiedOAuthIdentity;
|
|
1690
|
+
readonly reason: OAuthLinkConfirmationReason;
|
|
1691
|
+
readonly existingAccount?: OAuthAccountRecord;
|
|
1692
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
1693
|
+
}
|
|
1694
|
+
export type OAuthLinkConfirmationOperation = "start" | "inspect" | "confirm";
|
|
1695
|
+
declare const OAuthLinkConfirmationError_base: new <A extends Record<string, any> = {}>(args: import("effect/Types").VoidIfEmpty<{ readonly [P in keyof A as P extends "_tag" ? never : P]: A[P]; }>) => import("effect/Cause").YieldableError & {
|
|
1696
|
+
readonly _tag: "OAuthLinkConfirmationError";
|
|
1697
|
+
} & Readonly<A>;
|
|
1698
|
+
export declare class OAuthLinkConfirmationError extends OAuthLinkConfirmationError_base<{
|
|
1699
|
+
readonly operation: OAuthLinkConfirmationOperation;
|
|
1700
|
+
readonly message: string;
|
|
1701
|
+
readonly cause?: unknown;
|
|
1702
|
+
}> {
|
|
1703
|
+
}
|
|
1704
|
+
export interface OAuthLinkConfirmationService {
|
|
1705
|
+
readonly start: (input: OAuthLinkConfirmationStartInput) => Effect.Effect<StartedOAuthLinkConfirmation, OAuthLinkConfirmationError>;
|
|
1706
|
+
readonly inspect: (input: OAuthLinkConfirmationInspectInput) => Effect.Effect<PendingOAuthLinkConfirmation, OAuthLinkConfirmationError>;
|
|
1707
|
+
readonly confirm: (input: OAuthLinkConfirmationConfirmInput) => Effect.Effect<ConfirmedOAuthLinkConfirmation, OAuthLinkConfirmationError>;
|
|
1708
|
+
}
|
|
1709
|
+
declare const OAuthLinkConfirmation_base: Context.ServiceClass<OAuthLinkConfirmation, "auth/OAuthLinkConfirmation", OAuthLinkConfirmationService>;
|
|
1710
|
+
export declare class OAuthLinkConfirmation extends OAuthLinkConfirmation_base {
|
|
1711
|
+
}
|
|
1712
|
+
export declare namespace OAuthLinkConfirmation {
|
|
1713
|
+
const make: (service: OAuthLinkConfirmationService) => OAuthLinkConfirmationService;
|
|
1714
|
+
}
|
|
1715
|
+
export interface OAuthLinkConfirmationDependencies {
|
|
1716
|
+
readonly challenge: ChallengeService;
|
|
1717
|
+
readonly accounts: OAuthAccountStoreService;
|
|
1718
|
+
readonly crypto: CryptoService;
|
|
1719
|
+
readonly secretBytes?: number;
|
|
1720
|
+
}
|
|
1721
|
+
export interface OAuthStateDependencies {
|
|
1722
|
+
readonly crypto: CryptoService;
|
|
1723
|
+
readonly challenge: ChallengeService;
|
|
1724
|
+
readonly stateSecretBytes?: number;
|
|
1725
|
+
readonly codeVerifierBytes?: number;
|
|
1726
|
+
readonly nonceBytes?: number;
|
|
1727
|
+
}
|
|
1728
|
+
export interface OAuthAuthorizationCodeGrantDependencies {
|
|
1729
|
+
readonly crypto: CryptoService;
|
|
1730
|
+
readonly store: OAuthAuthorizationCodeStoreService;
|
|
1731
|
+
readonly codeBytes?: number;
|
|
1732
|
+
readonly codeTtl?: Duration.Duration;
|
|
1733
|
+
}
|
|
1734
|
+
export interface OAuthAuthorizationCodeTokenGrantDependencies {
|
|
1735
|
+
readonly clients: OAuthClientRegistryService;
|
|
1736
|
+
readonly authorizationCodes: OAuthAuthorizationCodeGrantService;
|
|
1737
|
+
readonly issuer: OAuthAuthorizationCodeTokenIssuerService;
|
|
1738
|
+
}
|
|
1739
|
+
export interface OAuthRefreshTokenGrantDependencies {
|
|
1740
|
+
readonly clients: OAuthClientRegistryService;
|
|
1741
|
+
readonly issuer: OAuthRefreshTokenIssuerService;
|
|
1742
|
+
}
|
|
1743
|
+
export interface OAuthClientCredentialsGrantDependencies {
|
|
1744
|
+
readonly clients: OAuthClientRegistryService;
|
|
1745
|
+
readonly issuer: OAuthClientCredentialsTokenIssuerService;
|
|
1746
|
+
}
|
|
1747
|
+
export interface OAuthProviderModeOpaqueTokenIssuerDependencies {
|
|
1748
|
+
readonly crypto: CryptoService;
|
|
1749
|
+
readonly tokenStore: OAuthProviderModeTokenStoreService;
|
|
1750
|
+
readonly accessTokenBytes?: number;
|
|
1751
|
+
readonly refreshTokenBytes?: number;
|
|
1752
|
+
readonly accessTokenTtl?: Duration.Duration;
|
|
1753
|
+
readonly refreshTokenTtl?: Duration.Duration;
|
|
1754
|
+
readonly issuer?: string;
|
|
1755
|
+
readonly audience?: string | readonly string[];
|
|
1756
|
+
readonly metadata?: Readonly<Record<string, unknown>>;
|
|
1757
|
+
readonly clientCredentialsSubject?: (input: OAuthClientCredentialsTokenIssueInput) => string;
|
|
1758
|
+
}
|
|
1759
|
+
export interface OAuthProviderModeOpaqueTokenIssuerServices {
|
|
1760
|
+
readonly authorizationCode: OAuthAuthorizationCodeTokenIssuerService;
|
|
1761
|
+
readonly refreshToken: OAuthRefreshTokenIssuerService;
|
|
1762
|
+
readonly clientCredentials: OAuthClientCredentialsTokenIssuerService;
|
|
1763
|
+
}
|
|
1764
|
+
export type OAuthProviderModeOpaqueTokenIssuerLiveOptions = Omit<OAuthProviderModeOpaqueTokenIssuerDependencies, "crypto" | "tokenStore">;
|
|
1765
|
+
export interface OAuthTokenRevocationDependencies {
|
|
1766
|
+
readonly clients: OAuthClientRegistryService;
|
|
1767
|
+
readonly revoker: OAuthTokenRevokerService;
|
|
1768
|
+
}
|
|
1769
|
+
export interface OAuthTokenIntrospectionDependencies {
|
|
1770
|
+
readonly clients: OAuthClientRegistryService;
|
|
1771
|
+
readonly introspector: OAuthTokenIntrospectorService;
|
|
1772
|
+
}
|
|
1773
|
+
export interface OAuthProviderAuthorizationDependencies {
|
|
1774
|
+
readonly clients: OAuthClientRegistryService;
|
|
1775
|
+
readonly authorizationCodes: OAuthAuthorizationCodeGrantService;
|
|
1776
|
+
readonly policy: OAuthProviderAuthorizationPolicyService;
|
|
1777
|
+
}
|
|
1778
|
+
export declare const makeOAuthClientSecrets: (dependencies: OAuthClientSecretsDependencies) => OAuthClientSecretsService;
|
|
1779
|
+
export declare const makeAppleSignInProvider: (input: AppleSignInProviderOptions) => OAuthProviderConfig;
|
|
1780
|
+
export declare const makeGithubOAuthProvider: (input: GithubOAuthProviderOptions) => OAuthProviderConfig;
|
|
1781
|
+
export declare const makeGoogleOidcProvider: (input: GoogleOidcProviderOptions) => OAuthProviderConfig;
|
|
1782
|
+
export declare const makeMicrosoftOidcProvider: (input: MicrosoftOidcProviderOptions) => OAuthProviderConfig;
|
|
1783
|
+
export declare const makeGenericOidcProvider: (input: GenericOidcProviderOptions) => OAuthProviderConfig;
|
|
1784
|
+
export declare const makeGoogleOidcProviderTokenRefreshInput: (input: GoogleOidcProviderTokenRefreshInput) => OAuthProviderTokenLifecycleRefreshInput;
|
|
1785
|
+
export declare const makeGoogleOidcProviderTokenRevokeInput: (input: GoogleOidcProviderTokenRevokeInput) => OAuthProviderTokenLifecycleRevokeInput;
|
|
1786
|
+
export declare const makeMicrosoftOidcProviderTokenRefreshInput: (input: MicrosoftOidcProviderTokenRefreshInput) => OAuthProviderTokenLifecycleRefreshInput;
|
|
1787
|
+
export declare const makeAppleSignInProviderTokenRefreshInput: (input: AppleSignInProviderTokenRefreshInput) => OAuthProviderTokenLifecycleRefreshInput;
|
|
1788
|
+
export declare const makeAppleSignInProviderTokenRevokeInput: (input: AppleSignInProviderTokenRevokeInput) => OAuthProviderTokenLifecycleRevokeInput;
|
|
1789
|
+
export declare const parseOAuthState: (state: OAuthStateToken | string) => Effect.Effect<{
|
|
1790
|
+
readonly challengeId: ChallengeId;
|
|
1791
|
+
readonly secret: Redacted.Redacted<string>;
|
|
1792
|
+
}, OAuthStateError>;
|
|
1793
|
+
export declare const githubOAuthVerifiedEmail: (emails: readonly GithubOAuthEmailRecord[]) => string | undefined;
|
|
1794
|
+
export declare const googleOidcHostedDomain: (value: Readonly<Record<string, unknown>>) => string | undefined;
|
|
1795
|
+
export declare const microsoftOidcTenantId: (value: Readonly<Record<string, unknown>>) => string | undefined;
|
|
1796
|
+
export declare const microsoftOidcObjectId: (value: Readonly<Record<string, unknown>>) => string | undefined;
|
|
1797
|
+
export declare const microsoftOidcAccountId: (value: Readonly<Record<string, unknown>>) => string | undefined;
|
|
1798
|
+
export declare const decodeAppleSignInAuthorizationUser: (value: unknown) => AppleSignInAuthorizationUser | undefined;
|
|
1799
|
+
export declare const appleSignInAuthorizationUserFullName: (user: AppleSignInAuthorizationUser | undefined) => string | undefined;
|
|
1800
|
+
export declare const appleSignInAuthorizationUserEmail: (user: AppleSignInAuthorizationUser | undefined) => Email | undefined;
|
|
1801
|
+
export declare const appleSignInIsPrivateEmail: (input: {
|
|
1802
|
+
readonly claims?: Readonly<Record<string, unknown>>;
|
|
1803
|
+
readonly email?: Email | string;
|
|
1804
|
+
}) => boolean | undefined;
|
|
1805
|
+
export declare const makeOAuthTokenRequest: (input: OAuthAuthorizationCodeTokenInput) => Effect.Effect<OAuthTokenRequest, OAuthTokenExchangeError>;
|
|
1806
|
+
export declare const makeOAuthRefreshTokenRequest: (input: OAuthRefreshTokenInput) => Effect.Effect<OAuthTokenRequest, OAuthTokenExchangeError>;
|
|
1807
|
+
export declare const makeOAuthTokenRevocationRequest: (input: OAuthTokenRevocationInput) => Effect.Effect<OAuthTokenRequest, OAuthTokenExchangeError>;
|
|
1808
|
+
export declare const makeOAuthUserInfoRequest: (input: OAuthUserInfoRequestInput) => Effect.Effect<OAuthUserInfoRequest, OAuthUserInfoError>;
|
|
1809
|
+
export declare const decodeOAuthUserInfoResponse: (value: unknown) => Effect.Effect<OAuthUserInfo, OAuthUserInfoError>;
|
|
1810
|
+
export declare const decodeOAuthTokenResponse: (value: unknown) => Effect.Effect<OAuthTokenResponse, OAuthTokenExchangeError>;
|
|
1811
|
+
export declare const makeOidcIdTokenVerifier: (dependencies: OidcIdTokenVerifierDependencies) => OidcIdTokenVerifierService;
|
|
1812
|
+
export declare const verifyOidcIdToken: (input: OidcIdTokenVerifyInput) => Effect.Effect<OidcIdTokenVerificationResult, OidcIdTokenVerifierError, OidcIdTokenVerifier>;
|
|
1813
|
+
export declare const decodeOAuthJwksDocument: (input: unknown) => Effect.Effect<JwksDocument, JwtError>;
|
|
1814
|
+
export declare const makeOAuthJwksJwtKeys: (dependencies: OAuthJwksJwtKeysDependencies) => JwtKeysService;
|
|
1815
|
+
export declare const normalizeOidcProfile: (input: OAuthProfileNormalizeInput) => Effect.Effect<OAuthProfile, OAuthProfileNormalizationError>;
|
|
1816
|
+
export declare const makeOidcOAuthProfileNormalizer: () => OAuthProfileNormalizerService;
|
|
1817
|
+
export declare const normalizeOAuthProfile: (input: OAuthProfileNormalizeInput) => Effect.Effect<OAuthProfile, OAuthProfileNormalizationError, OAuthProfileNormalizer>;
|
|
1818
|
+
export declare const verifiedOAuthIdentityFromProfile: (profile: OAuthProfile) => VerifiedOAuthIdentity;
|
|
1819
|
+
export declare const makeOAuthTokenExchange: (dependencies: OAuthTokenExchangeDependencies) => OAuthTokenExchangeService;
|
|
1820
|
+
export declare const makeOAuthProviderTokenLifecycle: (dependencies: OAuthProviderTokenLifecycleDependencies) => OAuthProviderTokenLifecycleService;
|
|
1821
|
+
export declare const OAuthProviderTokenLifecycleLive: (options: OAuthProviderTokenLifecycleLiveOptions) => Layer.Layer<OAuthProviderTokenLifecycle, never, OAuthProviderTokenVault>;
|
|
1822
|
+
export declare const storeOAuthProviderTokens: (input: OAuthProviderTokenLifecycleStoreInput) => Effect.Effect<OAuthProviderTokenLifecycleStoreResult, OAuthProviderTokenLifecycleError, OAuthProviderTokenLifecycle>;
|
|
1823
|
+
export declare const refreshOAuthProviderTokens: (input: OAuthProviderTokenLifecycleRefreshInput) => Effect.Effect<OAuthProviderTokenLifecycleRefreshResult, OAuthProviderTokenLifecycleError, OAuthProviderTokenLifecycle>;
|
|
1824
|
+
export declare const revokeOAuthProviderTokens: (input: OAuthProviderTokenLifecycleRevokeInput) => Effect.Effect<OAuthProviderTokenLifecycleRevokeResult, OAuthProviderTokenLifecycleError, OAuthProviderTokenLifecycle>;
|
|
1825
|
+
export declare const completeOAuthCallback: (input: OAuthCallbackInput) => Effect.Effect<OAuthCallbackResult, OAuthStateError | OAuthTokenExchangeError, OAuthState | OAuthTokenExchange>;
|
|
1826
|
+
export declare const makeOAuthAccountLinkingPolicy: (dependencies: OAuthAccountLinkingPolicyDependencies) => OAuthAccountLinkingService;
|
|
1827
|
+
export declare const resolveOAuthAccountLinking: (input: OAuthAccountLinkingResolveInput) => Effect.Effect<OAuthAccountLinkingResolution, OAuthAccountLinkingError, OAuthAccountLinking>;
|
|
1828
|
+
export declare const makeOAuthAccountUnlinkingPolicy: (dependencies: OAuthAccountUnlinkingPolicyDependencies) => OAuthAccountUnlinkingService;
|
|
1829
|
+
export declare const resolveOAuthAccountUnlinking: (input: OAuthAccountUnlinkingResolveInput) => Effect.Effect<OAuthAccountUnlinkingResolution, OAuthAccountUnlinkingError, OAuthAccountUnlinking>;
|
|
1830
|
+
export declare const makeOAuthLinkConfirmation: (dependencies: OAuthLinkConfirmationDependencies) => OAuthLinkConfirmationService;
|
|
1831
|
+
export declare const startOAuthLinkConfirmation: (input: OAuthLinkConfirmationStartInput) => Effect.Effect<StartedOAuthLinkConfirmation, OAuthLinkConfirmationError, OAuthLinkConfirmation>;
|
|
1832
|
+
export declare const inspectOAuthLinkConfirmation: (input: OAuthLinkConfirmationInspectInput) => Effect.Effect<PendingOAuthLinkConfirmation, OAuthLinkConfirmationError, OAuthLinkConfirmation>;
|
|
1833
|
+
export declare const confirmOAuthLinkConfirmation: (input: OAuthLinkConfirmationConfirmInput) => Effect.Effect<ConfirmedOAuthLinkConfirmation, OAuthLinkConfirmationError, OAuthLinkConfirmation>;
|
|
1834
|
+
export declare const makeOAuthAuthorizationCodeGrant: (dependencies: OAuthAuthorizationCodeGrantDependencies) => OAuthAuthorizationCodeGrantService;
|
|
1835
|
+
export declare const makeOAuthAuthorizationCodeTokenGrant: (dependencies: OAuthAuthorizationCodeTokenGrantDependencies) => OAuthAuthorizationCodeTokenGrantService;
|
|
1836
|
+
export declare const makeOAuthRefreshTokenGrant: (dependencies: OAuthRefreshTokenGrantDependencies) => OAuthRefreshTokenGrantService;
|
|
1837
|
+
export declare const makeOAuthClientCredentialsGrant: (dependencies: OAuthClientCredentialsGrantDependencies) => OAuthClientCredentialsGrantService;
|
|
1838
|
+
export declare const makeOAuthProviderModeOpaqueTokenIssuer: (dependencies: OAuthProviderModeOpaqueTokenIssuerDependencies) => OAuthProviderModeOpaqueTokenIssuerServices;
|
|
1839
|
+
export declare const makeOAuthClientSecretVerification: (dependencies: OAuthClientSecretVerificationDependencies) => OAuthClientSecretVerificationService;
|
|
1840
|
+
export declare const makeOAuthTokenRevocation: (dependencies: OAuthTokenRevocationDependencies) => OAuthTokenRevocationService;
|
|
1841
|
+
export declare const makeOAuthTokenIntrospection: (dependencies: OAuthTokenIntrospectionDependencies) => OAuthTokenIntrospectionService;
|
|
1842
|
+
export declare const makeOAuthProviderAuthorization: (dependencies: OAuthProviderAuthorizationDependencies) => OAuthProviderAuthorizationService;
|
|
1843
|
+
export declare const issueOAuthAuthorizationCode: (input: OAuthAuthorizationCodeIssueInput) => Effect.Effect<OAuthIssuedAuthorizationCode, OAuthAuthorizationCodeGrantError, OAuthAuthorizationCodeGrant>;
|
|
1844
|
+
export declare const consumeOAuthAuthorizationCode: (input: OAuthAuthorizationCodeConsumeInput) => Effect.Effect<OAuthAuthorizationCodeConsumeResult, OAuthAuthorizationCodeGrantError, OAuthAuthorizationCodeGrant>;
|
|
1845
|
+
export declare const exchangeOAuthAuthorizationCodeToken: (input: OAuthAuthorizationCodeTokenGrantInput) => Effect.Effect<OAuthAuthorizationCodeTokenGrantResult, OAuthAuthorizationCodeTokenGrantError, OAuthAuthorizationCodeTokenGrant>;
|
|
1846
|
+
export declare const exchangeOAuthRefreshToken: (input: OAuthRefreshTokenGrantInput) => Effect.Effect<OAuthRefreshTokenGrantResult, OAuthRefreshTokenGrantError, OAuthRefreshTokenGrant>;
|
|
1847
|
+
export declare const exchangeOAuthClientCredentialsToken: (input: OAuthClientCredentialsGrantInput) => Effect.Effect<OAuthClientCredentialsGrantResult, OAuthClientCredentialsGrantError, OAuthClientCredentialsGrant>;
|
|
1848
|
+
export declare const revokeOAuthToken: (input: OAuthTokenRevocationRequestInput) => Effect.Effect<OAuthTokenRevocationResult, OAuthTokenRevocationError, OAuthTokenRevocation>;
|
|
1849
|
+
export declare const introspectOAuthToken: (input: OAuthTokenIntrospectionRequestInput) => Effect.Effect<OAuthTokenIntrospectionResult, OAuthTokenIntrospectionError, OAuthTokenIntrospection>;
|
|
1850
|
+
export declare const authorizeOAuthProviderAuthorization: (input: OAuthProviderAuthorizationInput) => Effect.Effect<OAuthProviderAuthorizationResult, OAuthProviderAuthorizationError, OAuthProviderAuthorization>;
|
|
1851
|
+
export declare const makeOAuthPkce: (input?: OAuthPkceInput) => Effect.Effect<OAuthPkce, OAuthStateError, Crypto>;
|
|
1852
|
+
export declare const makeOAuthState: (dependencies: OAuthStateDependencies) => OAuthStateService;
|
|
1853
|
+
export declare const OAuthStateLive: Layer.Layer<OAuthState, never, Crypto | Challenge>;
|
|
1854
|
+
export declare const OAuthAuthorizationCodeGrantLive: Layer.Layer<OAuthAuthorizationCodeGrant, never, Crypto | OAuthAuthorizationCodeStore>;
|
|
1855
|
+
export declare const OAuthAuthorizationCodeTokenGrantLive: Layer.Layer<OAuthAuthorizationCodeTokenGrant, never, OAuthClientRegistry | OAuthAuthorizationCodeGrant | OAuthAuthorizationCodeTokenIssuer>;
|
|
1856
|
+
export declare const OAuthRefreshTokenGrantLive: Layer.Layer<OAuthRefreshTokenGrant, never, OAuthClientRegistry | OAuthRefreshTokenIssuer>;
|
|
1857
|
+
export declare const OAuthClientCredentialsGrantLive: Layer.Layer<OAuthClientCredentialsGrant, never, OAuthClientRegistry | OAuthClientCredentialsTokenIssuer>;
|
|
1858
|
+
export declare const OAuthProviderModeOpaqueTokenIssuerLive: (options?: OAuthProviderModeOpaqueTokenIssuerLiveOptions) => Layer.Layer<OAuthAuthorizationCodeTokenIssuer | OAuthRefreshTokenIssuer | OAuthClientCredentialsTokenIssuer, never, Crypto | OAuthProviderModeTokenStore>;
|
|
1859
|
+
export declare const OAuthTokenRevocationLive: Layer.Layer<OAuthTokenRevocation, never, OAuthClientRegistry | OAuthTokenRevoker>;
|
|
1860
|
+
export declare const OAuthTokenIntrospectionLive: Layer.Layer<OAuthTokenIntrospection, never, OAuthClientRegistry | OAuthTokenIntrospector>;
|
|
1861
|
+
export declare const OAuthProviderAuthorizationLive: Layer.Layer<OAuthProviderAuthorization, never, OAuthClientRegistry | OAuthAuthorizationCodeGrant | OAuthProviderAuthorizationPolicy>;
|
|
1862
|
+
export declare const makeOAuthProviders: (providers: readonly OAuthProviderConfig[]) => OAuthProvidersService;
|
|
1863
|
+
export declare const OAuthProvidersLive: (providers: readonly OAuthProviderConfig[]) => Layer.Layer<OAuthProviders, never, never>;
|
|
1864
|
+
export declare const OAuthClientSecretsLive: Layer.Layer<OAuthClientSecrets, never, Crypto>;
|
|
1865
|
+
export declare const OAuthClientSecretVerificationLive: Layer.Layer<OAuthClientSecretVerification, never, OAuthClientSecrets | OAuthClientSecretStore>;
|
|
1866
|
+
export declare const makeOAuthClientRegistryFromStore: (store: OAuthClientStoreService) => OAuthClientRegistryService;
|
|
1867
|
+
export declare const OAuthClientRegistryFromStoreLive: Layer.Layer<OAuthClientRegistry, never, OAuthClientStore>;
|
|
1868
|
+
export declare const makeOAuthClientRegistryMemory: (clients?: readonly OAuthClientRecord[]) => OAuthClientRegistryService;
|
|
1869
|
+
export declare const OAuthClientRegistryMemoryLive: (clients?: readonly OAuthClientRecord[]) => Layer.Layer<OAuthClientRegistry, never, never>;
|
|
1870
|
+
export declare const makeOAuthClientStoreMemory: (clients?: readonly OAuthClientRecord[]) => OAuthClientStoreService;
|
|
1871
|
+
export declare const OAuthClientStoreMemoryLive: (clients?: readonly OAuthClientRecord[]) => Layer.Layer<OAuthClientStore, never, never>;
|
|
1872
|
+
export declare const makeOAuthConsentStoreMemory: (records?: readonly OAuthConsentRecord[]) => OAuthConsentStoreService;
|
|
1873
|
+
export declare const OAuthConsentStoreMemoryLive: (records?: readonly OAuthConsentRecord[]) => Layer.Layer<OAuthConsentStore, never, never>;
|
|
1874
|
+
export declare const makeOAuthClientSecretStoreMemory: () => OAuthClientSecretStoreService;
|
|
1875
|
+
export declare const OAuthClientSecretStoreMemoryLive: Layer.Layer<OAuthClientSecretStore, never, never>;
|
|
1876
|
+
export declare const makeOAuthAuthorizationCodeStoreMemory: () => OAuthAuthorizationCodeStoreService;
|
|
1877
|
+
export declare const OAuthAuthorizationCodeStoreMemoryLive: Layer.Layer<OAuthAuthorizationCodeStore, never, never>;
|
|
1878
|
+
export declare const makeOAuthProviderModeTokenStoreMemory: () => OAuthProviderModeTokenStoreService;
|
|
1879
|
+
export declare const OAuthProviderModeTokenStoreMemoryLive: Layer.Layer<OAuthProviderModeTokenStore, never, never>;
|
|
1880
|
+
export declare const OidcIdTokenVerifierLive: Layer.Layer<OidcIdTokenVerifier, never, JwtVerifier>;
|
|
1881
|
+
export declare const OAuthOidcProfileNormalizerLive: Layer.Layer<OAuthProfileNormalizer, never, never>;
|
|
1882
|
+
export declare const OAuthAccountLinkingLive: Layer.Layer<OAuthAccountLinking, never, OAuthAccountStore>;
|
|
1883
|
+
export declare const OAuthAccountUnlinkingLive: Layer.Layer<OAuthAccountUnlinking, never, OAuthAccountStore>;
|
|
1884
|
+
export declare const OAuthLinkConfirmationLive: Layer.Layer<OAuthLinkConfirmation, never, Crypto | Challenge | OAuthAccountStore>;
|
|
1885
|
+
export declare const makeOAuthProviderTokenVaultMemory: () => OAuthProviderTokenVaultService;
|
|
1886
|
+
export declare const OAuthProviderTokenVaultMemoryLive: Layer.Layer<OAuthProviderTokenVault, never, never>;
|
|
1887
|
+
export declare const makeOAuthAccountStoreMemory: () => OAuthAccountStoreService;
|
|
1888
|
+
export declare const OAuthAccountStoreMemoryLive: Layer.Layer<OAuthAccountStore, never, never>;
|
|
1889
|
+
export {};
|
|
1890
|
+
//# sourceMappingURL=OAuth.d.ts.map
|