@tern-secure/backend 1.2.0-canary.v20251127235234 → 1.2.0-canary.v20251202164451
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/adapters/index.d.ts +1 -1
- package/dist/adapters/index.d.ts.map +1 -1
- package/dist/adapters/types.d.ts +42 -0
- package/dist/adapters/types.d.ts.map +1 -1
- package/dist/admin/index.d.ts +1 -1
- package/dist/admin/index.d.ts.map +1 -1
- package/dist/admin/index.js +8 -1
- package/dist/admin/index.js.map +1 -1
- package/dist/admin/index.mjs +24 -598
- package/dist/admin/index.mjs.map +1 -1
- package/dist/app-check/AppCheckApi.d.ts +14 -0
- package/dist/app-check/AppCheckApi.d.ts.map +1 -0
- package/dist/app-check/generator.d.ts +9 -0
- package/dist/app-check/generator.d.ts.map +1 -0
- package/dist/app-check/index.d.ts +18 -0
- package/dist/app-check/index.d.ts.map +1 -0
- package/dist/app-check/index.js +1135 -0
- package/dist/app-check/index.js.map +1 -0
- package/dist/app-check/index.mjs +13 -0
- package/dist/app-check/index.mjs.map +1 -0
- package/dist/app-check/serverAppCheck.d.ts +33 -0
- package/dist/app-check/serverAppCheck.d.ts.map +1 -0
- package/dist/app-check/types.d.ts +21 -0
- package/dist/app-check/types.d.ts.map +1 -0
- package/dist/app-check/verifier.d.ts +16 -0
- package/dist/app-check/verifier.d.ts.map +1 -0
- package/dist/auth/credential.d.ts +5 -5
- package/dist/auth/credential.d.ts.map +1 -1
- package/dist/auth/getauth.d.ts +2 -1
- package/dist/auth/getauth.d.ts.map +1 -1
- package/dist/auth/index.d.ts +2 -0
- package/dist/auth/index.d.ts.map +1 -1
- package/dist/auth/index.js +902 -394
- package/dist/auth/index.js.map +1 -1
- package/dist/auth/index.mjs +5 -3
- package/dist/chunk-34QENCWP.mjs +784 -0
- package/dist/chunk-34QENCWP.mjs.map +1 -0
- package/dist/{chunk-NXYWC6YO.mjs → chunk-TUYCJY35.mjs} +182 -6
- package/dist/chunk-TUYCJY35.mjs.map +1 -0
- package/dist/chunk-UCSJDX6Y.mjs +778 -0
- package/dist/chunk-UCSJDX6Y.mjs.map +1 -0
- package/dist/constants.d.ts +10 -1
- package/dist/constants.d.ts.map +1 -1
- package/dist/fireRestApi/endpoints/AppCheckApi.d.ts.map +1 -1
- package/dist/index.d.ts +4 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1275 -856
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +97 -137
- package/dist/index.mjs.map +1 -1
- package/dist/jwt/crypto-signer.d.ts +21 -0
- package/dist/jwt/crypto-signer.d.ts.map +1 -0
- package/dist/jwt/index.d.ts +2 -1
- package/dist/jwt/index.d.ts.map +1 -1
- package/dist/jwt/index.js +119 -2
- package/dist/jwt/index.js.map +1 -1
- package/dist/jwt/index.mjs +7 -3
- package/dist/jwt/signJwt.d.ts +8 -2
- package/dist/jwt/signJwt.d.ts.map +1 -1
- package/dist/jwt/types.d.ts +6 -0
- package/dist/jwt/types.d.ts.map +1 -1
- package/dist/jwt/verifyJwt.d.ts +7 -1
- package/dist/jwt/verifyJwt.d.ts.map +1 -1
- package/dist/tokens/authstate.d.ts +2 -0
- package/dist/tokens/authstate.d.ts.map +1 -1
- package/dist/tokens/c-authenticateRequestProcessor.d.ts +2 -2
- package/dist/tokens/c-authenticateRequestProcessor.d.ts.map +1 -1
- package/dist/tokens/keys.d.ts.map +1 -1
- package/dist/tokens/request.d.ts.map +1 -1
- package/dist/tokens/types.d.ts +6 -4
- package/dist/tokens/types.d.ts.map +1 -1
- package/dist/utils/config.d.ts.map +1 -1
- package/dist/{auth/utils.d.ts → utils/fetcher.d.ts} +2 -1
- package/dist/utils/fetcher.d.ts.map +1 -0
- package/dist/utils/mapDecode.d.ts +2 -1
- package/dist/utils/mapDecode.d.ts.map +1 -1
- package/dist/utils/token-generator.d.ts +4 -0
- package/dist/utils/token-generator.d.ts.map +1 -0
- package/package.json +13 -3
- package/dist/auth/constants.d.ts +0 -6
- package/dist/auth/constants.d.ts.map +0 -1
- package/dist/auth/utils.d.ts.map +0 -1
- package/dist/chunk-DJLDUW7J.mjs +0 -414
- package/dist/chunk-DJLDUW7J.mjs.map +0 -1
- package/dist/chunk-GFH5CXQR.mjs +0 -71
- package/dist/chunk-GFH5CXQR.mjs.map +0 -1
- package/dist/chunk-NXYWC6YO.mjs.map +0 -1
- package/dist/chunk-WIVOBOZR.mjs +0 -86
- package/dist/chunk-WIVOBOZR.mjs.map +0 -1
- package/dist/utils/gemini_admin-init.d.ts +0 -10
- package/dist/utils/gemini_admin-init.d.ts.map +0 -1
package/dist/chunk-WIVOBOZR.mjs
DELETED
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
// src/constants.ts
|
|
2
|
-
var GOOGLE_PUBLIC_KEYS_URL = "https://www.googleapis.com/robot/v1/metadata/x509/securetoken@system.gserviceaccount.com";
|
|
3
|
-
var MAX_CACHE_LAST_UPDATED_AT_SECONDS = 5 * 60;
|
|
4
|
-
var DEFAULT_CACHE_DURATION = 3600 * 1e3;
|
|
5
|
-
var CACHE_CONTROL_REGEX = /max-age=(\d+)/;
|
|
6
|
-
var Attributes = {
|
|
7
|
-
AuthToken: "__ternsecureAuthToken",
|
|
8
|
-
AuthSignature: "__ternsecureAuthSignature",
|
|
9
|
-
AuthStatus: "__ternsecureAuthStatus",
|
|
10
|
-
AuthReason: "__ternsecureAuthReason",
|
|
11
|
-
AuthMessage: "__ternsecureAuthMessage",
|
|
12
|
-
TernSecureUrl: "__ternsecureUrl"
|
|
13
|
-
};
|
|
14
|
-
var Cookies = {
|
|
15
|
-
Session: "__session",
|
|
16
|
-
CsrfToken: "__terncf",
|
|
17
|
-
IdToken: "TernSecure_[DEFAULT]",
|
|
18
|
-
Refresh: "TernSecureID_[DEFAULT]",
|
|
19
|
-
Custom: "__custom",
|
|
20
|
-
TernAut: "tern_aut",
|
|
21
|
-
Handshake: "__ternsecure_handshake",
|
|
22
|
-
DevBrowser: "__ternsecure_db_jwt",
|
|
23
|
-
RedirectCount: "__ternsecure_redirect_count",
|
|
24
|
-
HandshakeNonce: "__ternsecure_handshake_nonce"
|
|
25
|
-
};
|
|
26
|
-
var QueryParameters = {
|
|
27
|
-
TernSynced: "__tern_synced",
|
|
28
|
-
SuffixedCookies: "suffixed_cookies",
|
|
29
|
-
TernRedirectUrl: "__tern_redirect_url",
|
|
30
|
-
// use the reference to Cookies to indicate that it's the same value
|
|
31
|
-
DevBrowser: Cookies.DevBrowser,
|
|
32
|
-
Handshake: Cookies.Handshake,
|
|
33
|
-
HandshakeHelp: "__tern_help",
|
|
34
|
-
LegacyDevBrowser: "__dev_session",
|
|
35
|
-
HandshakeReason: "__tern_hs_reason",
|
|
36
|
-
HandshakeNonce: Cookies.HandshakeNonce
|
|
37
|
-
};
|
|
38
|
-
var Headers = {
|
|
39
|
-
Accept: "accept",
|
|
40
|
-
AppCheckToken: "x-firebase-appcheck",
|
|
41
|
-
AuthMessage: "x-ternsecure-auth-message",
|
|
42
|
-
Authorization: "authorization",
|
|
43
|
-
AuthReason: "x-ternsecure-auth-reason",
|
|
44
|
-
AuthSignature: "x-ternsecure-auth-signature",
|
|
45
|
-
AuthStatus: "x-ternsecure-auth-status",
|
|
46
|
-
AuthToken: "x-ternsecure-auth-token",
|
|
47
|
-
CacheControl: "cache-control",
|
|
48
|
-
TernSecureRedirectTo: "x-ternsecure-redirect-to",
|
|
49
|
-
TernSecureRequestData: "x-ternsecure-request-data",
|
|
50
|
-
TernSecureUrl: "x-ternsecure-url",
|
|
51
|
-
CloudFrontForwardedProto: "cloudfront-forwarded-proto",
|
|
52
|
-
ContentType: "content-type",
|
|
53
|
-
ContentSecurityPolicy: "content-security-policy",
|
|
54
|
-
ContentSecurityPolicyReportOnly: "content-security-policy-report-only",
|
|
55
|
-
EnableDebug: "x-ternsecure-debug",
|
|
56
|
-
ForwardedHost: "x-forwarded-host",
|
|
57
|
-
ForwardedPort: "x-forwarded-port",
|
|
58
|
-
ForwardedProto: "x-forwarded-proto",
|
|
59
|
-
Host: "host",
|
|
60
|
-
Location: "location",
|
|
61
|
-
Nonce: "x-nonce",
|
|
62
|
-
Origin: "origin",
|
|
63
|
-
Referrer: "referer",
|
|
64
|
-
SecFetchDest: "sec-fetch-dest",
|
|
65
|
-
UserAgent: "user-agent",
|
|
66
|
-
ReportingEndpoints: "reporting-endpoints"
|
|
67
|
-
};
|
|
68
|
-
var ContentTypes = {
|
|
69
|
-
Json: "application/json"
|
|
70
|
-
};
|
|
71
|
-
var constants = {
|
|
72
|
-
Attributes,
|
|
73
|
-
Cookies,
|
|
74
|
-
Headers,
|
|
75
|
-
ContentTypes,
|
|
76
|
-
QueryParameters
|
|
77
|
-
};
|
|
78
|
-
|
|
79
|
-
export {
|
|
80
|
-
GOOGLE_PUBLIC_KEYS_URL,
|
|
81
|
-
MAX_CACHE_LAST_UPDATED_AT_SECONDS,
|
|
82
|
-
DEFAULT_CACHE_DURATION,
|
|
83
|
-
CACHE_CONTROL_REGEX,
|
|
84
|
-
constants
|
|
85
|
-
};
|
|
86
|
-
//# sourceMappingURL=chunk-WIVOBOZR.mjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/constants.ts"],"sourcesContent":["export const GOOGLE_PUBLIC_KEYS_URL =\n 'https://www.googleapis.com/robot/v1/metadata/x509/securetoken@system.gserviceaccount.com';\nexport const SESSION_COOKIE_PUBLIC_KEYS_URL =\n 'https://www.googleapis.com/identitytoolkit/v3/relyingparty/publicKeys';\n\nexport const MAX_CACHE_LAST_UPDATED_AT_SECONDS = 5 * 60;\nexport const DEFAULT_CACHE_DURATION = 3600 * 1000; // 1 hour in milliseconds\nexport const CACHE_CONTROL_REGEX = /max-age=(\\d+)/;\n\nconst Attributes = {\n AuthToken: '__ternsecureAuthToken',\n AuthSignature: '__ternsecureAuthSignature',\n AuthStatus: '__ternsecureAuthStatus',\n AuthReason: '__ternsecureAuthReason',\n AuthMessage: '__ternsecureAuthMessage',\n TernSecureUrl: '__ternsecureUrl',\n} as const;\n\nconst Cookies = {\n Session: '__session',\n CsrfToken: '__terncf',\n IdToken: 'TernSecure_[DEFAULT]',\n Refresh: 'TernSecureID_[DEFAULT]',\n Custom: '__custom',\n TernAut: 'tern_aut',\n Handshake: '__ternsecure_handshake',\n DevBrowser: '__ternsecure_db_jwt',\n RedirectCount: '__ternsecure_redirect_count',\n HandshakeNonce: '__ternsecure_handshake_nonce',\n} as const;\n\n\nconst QueryParameters = {\n TernSynced: '__tern_synced',\n SuffixedCookies: 'suffixed_cookies',\n TernRedirectUrl: '__tern_redirect_url',\n // use the reference to Cookies to indicate that it's the same value\n DevBrowser: Cookies.DevBrowser,\n Handshake: Cookies.Handshake,\n HandshakeHelp: '__tern_help',\n LegacyDevBrowser: '__dev_session',\n HandshakeReason: '__tern_hs_reason',\n HandshakeNonce: Cookies.HandshakeNonce,\n} as const;\n\nconst Headers = {\n Accept: 'accept',\n AppCheckToken: 'x-firebase-appcheck',\n AuthMessage: 'x-ternsecure-auth-message',\n Authorization: 'authorization',\n AuthReason: 'x-ternsecure-auth-reason',\n AuthSignature: 'x-ternsecure-auth-signature',\n AuthStatus: 'x-ternsecure-auth-status',\n AuthToken: 'x-ternsecure-auth-token',\n CacheControl: 'cache-control',\n TernSecureRedirectTo: 'x-ternsecure-redirect-to',\n TernSecureRequestData: 'x-ternsecure-request-data',\n TernSecureUrl: 'x-ternsecure-url',\n CloudFrontForwardedProto: 'cloudfront-forwarded-proto',\n ContentType: 'content-type',\n ContentSecurityPolicy: 'content-security-policy',\n ContentSecurityPolicyReportOnly: 'content-security-policy-report-only',\n EnableDebug: 'x-ternsecure-debug',\n ForwardedHost: 'x-forwarded-host',\n ForwardedPort: 'x-forwarded-port',\n ForwardedProto: 'x-forwarded-proto',\n Host: 'host',\n Location: 'location',\n Nonce: 'x-nonce',\n Origin: 'origin',\n Referrer: 'referer',\n SecFetchDest: 'sec-fetch-dest',\n UserAgent: 'user-agent',\n ReportingEndpoints: 'reporting-endpoints',\n} as const;\n\nconst ContentTypes = {\n Json: 'application/json',\n} as const;\n\n/**\n * @internal\n */\nexport const constants = {\n Attributes,\n Cookies,\n Headers,\n ContentTypes,\n QueryParameters,\n} as const;\n\nexport type Constants = typeof constants;\n"],"mappings":";AAAO,IAAM,yBACX;AAIK,IAAM,oCAAoC,IAAI;AAC9C,IAAM,yBAAyB,OAAO;AACtC,IAAM,sBAAsB;AAEnC,IAAM,aAAa;AAAA,EACjB,WAAW;AAAA,EACX,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,YAAY;AAAA,EACZ,aAAa;AAAA,EACb,eAAe;AACjB;AAEA,IAAM,UAAU;AAAA,EACd,SAAS;AAAA,EACT,WAAW;AAAA,EACX,SAAS;AAAA,EACT,SAAS;AAAA,EACT,QAAQ;AAAA,EACR,SAAS;AAAA,EACT,WAAW;AAAA,EACX,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,gBAAgB;AAClB;AAGA,IAAM,kBAAkB;AAAA,EACtB,YAAY;AAAA,EACZ,iBAAiB;AAAA,EACjB,iBAAiB;AAAA;AAAA,EAEjB,YAAY,QAAQ;AAAA,EACpB,WAAW,QAAQ;AAAA,EACnB,eAAe;AAAA,EACf,kBAAkB;AAAA,EAClB,iBAAiB;AAAA,EACjB,gBAAgB,QAAQ;AAC1B;AAEA,IAAM,UAAU;AAAA,EACd,QAAQ;AAAA,EACR,eAAe;AAAA,EACf,aAAa;AAAA,EACb,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,eAAe;AAAA,EACf,YAAY;AAAA,EACZ,WAAW;AAAA,EACX,cAAc;AAAA,EACd,sBAAsB;AAAA,EACtB,uBAAuB;AAAA,EACvB,eAAe;AAAA,EACf,0BAA0B;AAAA,EAC1B,aAAa;AAAA,EACb,uBAAuB;AAAA,EACvB,iCAAiC;AAAA,EACjC,aAAa;AAAA,EACb,eAAe;AAAA,EACf,eAAe;AAAA,EACf,gBAAgB;AAAA,EAChB,MAAM;AAAA,EACN,UAAU;AAAA,EACV,OAAO;AAAA,EACP,QAAQ;AAAA,EACR,UAAU;AAAA,EACV,cAAc;AAAA,EACd,WAAW;AAAA,EACX,oBAAoB;AACtB;AAEA,IAAM,eAAe;AAAA,EACnB,MAAM;AACR;AAKO,IAAM,YAAY;AAAA,EACvB;AAAA,EACA;AAAA,EACA;AAAA,EACA;AAAA,EACA;AACF;","names":[]}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import admin from 'firebase-admin';
|
|
2
|
-
/**
|
|
3
|
-
* Gets the appropriate Firebase Auth instance.
|
|
4
|
-
* If a tenantId is provided, it returns the Auth instance for that tenant.
|
|
5
|
-
* Otherwise, it returns the default project-level Auth instance.
|
|
6
|
-
* @param tenantId - The optional tenant ID.
|
|
7
|
-
* @returns An admin.auth.Auth instance.
|
|
8
|
-
*/
|
|
9
|
-
export declare function getAuthForTenant(tenantId?: string): admin.auth.Auth;
|
|
10
|
-
//# sourceMappingURL=gemini_admin-init.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"gemini_admin-init.d.ts","sourceRoot":"","sources":["../../src/utils/gemini_admin-init.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,gBAAgB,CAAC;AAoBnC;;;;;;GAMG;AACH,wBAAgB,gBAAgB,CAAC,QAAQ,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,IAAI,CAAC,IAAI,CAKnE"}
|