@absolutejs/auth 0.83.0 → 0.85.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1069,6 +1069,31 @@ export declare const buildClientProviders: (providersConfiguration: OAuth2Config
1069
1069
  encoding: "application/x-www-form-urlencoded";
1070
1070
  url: string;
1071
1071
  };
1072
+ } & import("citra").ProviderConfig<any>) | ({
1073
+ authorizationUrl: string;
1074
+ isOIDC: true;
1075
+ isRefreshable: true;
1076
+ PKCEMethod: "S256";
1077
+ profileRequest: {
1078
+ authIn: "header";
1079
+ encoding: "application/json";
1080
+ method: "GET";
1081
+ url: string;
1082
+ };
1083
+ revocationRequest: {
1084
+ authIn: "body";
1085
+ encoding: "application/x-www-form-urlencoded";
1086
+ tokenParamName: "token";
1087
+ url: string;
1088
+ };
1089
+ scopeRequired: true;
1090
+ subject: string[];
1091
+ subjectType: "string";
1092
+ tokenRequest: {
1093
+ authIn: "body";
1094
+ encoding: "application/x-www-form-urlencoded";
1095
+ url: string;
1096
+ };
1072
1097
  } & import("citra").ProviderConfig<any>) | ({
1073
1098
  authorizationUrl: string;
1074
1099
  email: string[];
@@ -1810,7 +1835,7 @@ export declare const buildClientProviders: (providersConfiguration: OAuth2Config
1810
1835
  url: string;
1811
1836
  };
1812
1837
  } & import("citra").ProviderConfig<any>);
1813
- providerInstance: OAuth2Client<"42" | "absolutejs" | "amazoncognito" | "anilist" | "apple" | "atlassian" | "attio" | "auth0" | "authentik" | "autodesk" | "azureadb2c" | "battlenet" | "bitbucket" | "box" | "bungie" | "calendly" | "close" | "coinbase" | "discord" | "donationalerts" | "dribbble" | "dropbox" | "epicgames" | "etsy" | "facebook" | "figma" | "gitea" | "github" | "gitlab" | "gohighlevel" | "google" | "hubspot" | "intuit" | "kakao" | "keycloak" | "kick" | "lichess" | "line" | "linear" | "linkedin" | "mastodon" | "mercadolibre" | "mercadopago" | "microsoftentraexternalid" | "microsoftentraid" | "monday" | "myanimelist" | "naver" | "notion" | "okta" | "onspark" | "osu" | "patreon" | "pipedrive" | "polar" | "polaraccesslink" | "polarteampro" | "reddit" | "roblox" | "salesforce" | "shikimori" | "slack" | "slackuser" | "spotify" | "startgg" | "strava" | "synology" | "tiktok" | "tiltify" | "tumblr" | "twitch" | "twitter" | "vk" | "withings" | "workos" | "yahoo" | "yandex" | "zoho" | "zoom">;
1838
+ providerInstance: OAuth2Client<"42" | "absolutejs" | "amazoncognito" | "anilist" | "apple" | "atlassian" | "attio" | "auth0" | "authentik" | "autodesk" | "azureadb2c" | "battlenet" | "bitbucket" | "box" | "bungie" | "calendly" | "close" | "coinbase" | "discord" | "donationalerts" | "dribbble" | "dropbox" | "epicgames" | "etsy" | "facebook" | "figma" | "gitea" | "github" | "gitlab" | "gohighlevel" | "google" | "hubspot" | "intuit" | "kakao" | "keycloak" | "kick" | "lichess" | "line" | "linear" | "linkedin" | "mastodon" | "mercadolibre" | "mercadopago" | "microsoftentraexternalid" | "microsoftentraid" | "monday" | "myanimelist" | "naver" | "neon" | "notion" | "okta" | "onspark" | "osu" | "patreon" | "pipedrive" | "polar" | "polaraccesslink" | "polarteampro" | "reddit" | "roblox" | "salesforce" | "shikimori" | "slack" | "slackuser" | "spotify" | "startgg" | "strava" | "synology" | "tiktok" | "tiltify" | "tumblr" | "twitch" | "twitter" | "vk" | "withings" | "workos" | "yahoo" | "yandex" | "zoho" | "zoom">;
1814
1839
  requiresPKCE: boolean;
1815
1840
  scope: string[] | undefined;
1816
1841
  searchParams: [string, string][] | undefined;
@@ -1821,7 +1846,7 @@ export declare const buildClientProviders: (providersConfiguration: OAuth2Config
1821
1846
  }>;
1822
1847
  export declare const normalizeProvidersConfiguration: (providersConfiguration: OAuth2ConfigurationOptions) => {
1823
1848
  [k: string]: {
1824
- [k: string]: OAuth2ProviderClientConfiguration<"42" | "absolutejs" | "amazoncognito" | "anilist" | "apple" | "atlassian" | "attio" | "auth0" | "authentik" | "autodesk" | "azureadb2c" | "battlenet" | "bitbucket" | "box" | "bungie" | "calendly" | "close" | "coinbase" | "discord" | "donationalerts" | "dribbble" | "dropbox" | "epicgames" | "etsy" | "facebook" | "figma" | "gitea" | "github" | "gitlab" | "gohighlevel" | "google" | "hubspot" | "intuit" | "kakao" | "keycloak" | "kick" | "lichess" | "line" | "linear" | "linkedin" | "mastodon" | "mercadolibre" | "mercadopago" | "microsoftentraexternalid" | "microsoftentraid" | "monday" | "myanimelist" | "naver" | "notion" | "okta" | "onspark" | "osu" | "patreon" | "pipedrive" | "polar" | "polaraccesslink" | "polarteampro" | "reddit" | "roblox" | "salesforce" | "shikimori" | "slack" | "slackuser" | "spotify" | "startgg" | "strava" | "synology" | "tiktok" | "tiltify" | "tumblr" | "twitch" | "twitter" | "vk" | "withings" | "workos" | "yahoo" | "yandex" | "zoho" | "zoom">;
1849
+ [k: string]: OAuth2ProviderClientConfiguration<"42" | "absolutejs" | "amazoncognito" | "anilist" | "apple" | "atlassian" | "attio" | "auth0" | "authentik" | "autodesk" | "azureadb2c" | "battlenet" | "bitbucket" | "box" | "bungie" | "calendly" | "close" | "coinbase" | "discord" | "donationalerts" | "dribbble" | "dropbox" | "epicgames" | "etsy" | "facebook" | "figma" | "gitea" | "github" | "gitlab" | "gohighlevel" | "google" | "hubspot" | "intuit" | "kakao" | "keycloak" | "kick" | "lichess" | "line" | "linear" | "linkedin" | "mastodon" | "mercadolibre" | "mercadopago" | "microsoftentraexternalid" | "microsoftentraid" | "monday" | "myanimelist" | "naver" | "neon" | "notion" | "okta" | "onspark" | "osu" | "patreon" | "pipedrive" | "polar" | "polaraccesslink" | "polarteampro" | "reddit" | "roblox" | "salesforce" | "shikimori" | "slack" | "slackuser" | "spotify" | "startgg" | "strava" | "synology" | "tiktok" | "tiltify" | "tumblr" | "twitch" | "twitter" | "vk" | "withings" | "workos" | "yahoo" | "yandex" | "zoho" | "zoom">;
1825
1850
  };
1826
1851
  };
1827
1852
  export declare const resolveClientProviderEntry: ({ clientName, clientProviders, providerName }: {
@@ -1852,7 +1877,7 @@ export declare const resolveProviderClientConfiguration: ({ clientName, provider
1852
1877
  error: "Client provider not found";
1853
1878
  config?: undefined;
1854
1879
  } | {
1855
- config: OAuth2ProviderClientConfiguration<"42" | "absolutejs" | "amazoncognito" | "anilist" | "apple" | "atlassian" | "attio" | "auth0" | "authentik" | "autodesk" | "azureadb2c" | "battlenet" | "bitbucket" | "box" | "bungie" | "calendly" | "close" | "coinbase" | "discord" | "donationalerts" | "dribbble" | "dropbox" | "epicgames" | "etsy" | "facebook" | "figma" | "gitea" | "github" | "gitlab" | "gohighlevel" | "google" | "hubspot" | "intuit" | "kakao" | "keycloak" | "kick" | "lichess" | "line" | "linear" | "linkedin" | "mastodon" | "mercadolibre" | "mercadopago" | "microsoftentraexternalid" | "microsoftentraid" | "monday" | "myanimelist" | "naver" | "notion" | "okta" | "onspark" | "osu" | "patreon" | "pipedrive" | "polar" | "polaraccesslink" | "polarteampro" | "reddit" | "roblox" | "salesforce" | "shikimori" | "slack" | "slackuser" | "spotify" | "startgg" | "strava" | "synology" | "tiktok" | "tiltify" | "tumblr" | "twitch" | "twitter" | "vk" | "withings" | "workos" | "yahoo" | "yandex" | "zoho" | "zoom"> | undefined;
1880
+ config: OAuth2ProviderClientConfiguration<"42" | "absolutejs" | "amazoncognito" | "anilist" | "apple" | "atlassian" | "attio" | "auth0" | "authentik" | "autodesk" | "azureadb2c" | "battlenet" | "bitbucket" | "box" | "bungie" | "calendly" | "close" | "coinbase" | "discord" | "donationalerts" | "dribbble" | "dropbox" | "epicgames" | "etsy" | "facebook" | "figma" | "gitea" | "github" | "gitlab" | "gohighlevel" | "google" | "hubspot" | "intuit" | "kakao" | "keycloak" | "kick" | "lichess" | "line" | "linear" | "linkedin" | "mastodon" | "mercadolibre" | "mercadopago" | "microsoftentraexternalid" | "microsoftentraid" | "monday" | "myanimelist" | "naver" | "neon" | "notion" | "okta" | "onspark" | "osu" | "patreon" | "pipedrive" | "polar" | "polaraccesslink" | "polarteampro" | "reddit" | "roblox" | "salesforce" | "shikimori" | "slack" | "slackuser" | "spotify" | "startgg" | "strava" | "synology" | "tiktok" | "tiltify" | "tumblr" | "twitch" | "twitter" | "vk" | "withings" | "workos" | "yahoo" | "yandex" | "zoho" | "zoom"> | undefined;
1856
1881
  readonly error?: undefined;
1857
1882
  } | {
1858
1883
  error: "Client variant is required";
@@ -1,2 +1,4 @@
1
1
  export type { CredentialsFor, OAuth2Client, OAuth2TokenResponse, OIDCProvider, PKCEProvider, ProviderConfiguration, ProviderOption, ProvidersMap, RefreshableProvider, RevocableProvider, ScopeRequiredProvider } from 'citra';
2
2
  export { decodeJWT, extractPropFromIdentity, isOIDCProviderOption, isPKCEProviderOption, isRefreshableOAuth2Client, isRefreshableProviderOption, isRevocableOAuth2Client, isRevocableProviderOption, isValidProviderOption, oidcProviderOptions, pkceProviderOptions, providerOptions, providers, refreshableProviderOptions, revocableProviderOptions, scopeRequiredProviderOptions } from 'citra';
3
+ export { createNeonProviderConfiguration, neonProviderConfiguration } from './neon';
4
+ export type { NeonManagementScope, NeonProviderOptions } from './neon';
@@ -1262,6 +1262,32 @@ var providers = defineProviders({
1262
1262
  url: "https://nid.naver.com/oauth2.0/token"
1263
1263
  }
1264
1264
  },
1265
+ neon: {
1266
+ authorizationUrl: "https://oauth2.neon.tech/oauth2/auth",
1267
+ isOIDC: true,
1268
+ isRefreshable: true,
1269
+ PKCEMethod: "S256",
1270
+ profileRequest: {
1271
+ authIn: "header",
1272
+ encoding: "application/json",
1273
+ method: "GET",
1274
+ url: "https://oauth2.neon.tech/userinfo"
1275
+ },
1276
+ revocationRequest: {
1277
+ authIn: "body",
1278
+ encoding: "application/x-www-form-urlencoded",
1279
+ tokenParamName: "token",
1280
+ url: "https://oauth2.neon.tech/oauth2/revoke"
1281
+ },
1282
+ scopeRequired: true,
1283
+ subject: ["sub"],
1284
+ subjectType: "string",
1285
+ tokenRequest: {
1286
+ authIn: "body",
1287
+ encoding: "application/x-www-form-urlencoded",
1288
+ url: "https://oauth2.neon.tech/oauth2/token"
1289
+ }
1290
+ },
1265
1291
  notion: {
1266
1292
  authorizationUrl: "https://api.notion.com/v1/oauth/authorize",
1267
1293
  email: ["bot", "owner", "user", "person", "email"],
@@ -2882,7 +2908,22 @@ var buildOAuth2Client = async (meta, config) => {
2882
2908
  };
2883
2909
  var createCustomOAuth2Client = (providerConfig, credentials) => buildOAuth2Client(providerConfig, credentials);
2884
2910
  var createOAuth2Client = (providerName, config) => buildOAuth2Client(providers[providerName], config);
2911
+ // src/providers/neon.ts
2912
+ var neonProviderConfiguration = providers.neon;
2913
+ var createNeonProviderConfiguration = ({
2914
+ credentials,
2915
+ offlineAccess = false,
2916
+ scopes
2917
+ }) => ({
2918
+ credentials: { ...credentials },
2919
+ scope: [
2920
+ "openid",
2921
+ ...offlineAccess ? ["offline", "offline_access"] : [],
2922
+ ...new Set(scopes)
2923
+ ]
2924
+ });
2885
2925
  export {
2926
+ createNeonProviderConfiguration,
2886
2927
  decodeJWT,
2887
2928
  extractPropFromIdentity,
2888
2929
  isOIDCProviderOption,
@@ -2892,6 +2933,7 @@ export {
2892
2933
  isRevocableOAuth2Client,
2893
2934
  isRevocableProviderOption,
2894
2935
  isValidProviderOption,
2936
+ neonProviderConfiguration,
2895
2937
  oidcProviderOptions,
2896
2938
  pkceProviderOptions,
2897
2939
  providerOptions,
@@ -2901,5 +2943,5 @@ export {
2901
2943
  scopeRequiredProviderOptions
2902
2944
  };
2903
2945
 
2904
- //# debugId=6E2CB0B72CE2EDF964756E2164756E21
2946
+ //# debugId=5BB504DE6AFE93D864756E2164756E21
2905
2947
  //# sourceMappingURL=index.js.map