@infoteam/account-server 0.9.0 → 0.10.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.d.ts +2 -2
- package/dist/index.js +2 -2
- package/package.json +2 -2
package/dist/index.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccountError, AccountErrorCode, AccountMetadata, AccountMetadata as AccountMetadata$1, ClientScope, ClientScope as ClientScope$1, ENVIRONMENTS, Environment, ExchangeCodeParams, ExchangeCodeParams as ExchangeCodeParams$1, IdTokenClaims, IdTokenClaims as IdTokenClaims$1, IssuerInput, IssuerInput as IssuerInput$1, LoginCodeBodySchema, LoginRequestBody, LoginTicketBodySchema, RevokeParams, RevokeParams as RevokeParams$1, SESSION_REJECTED, Scope, SessionRejectedResponse, SessionTokensResponse, SessionTokensResponseSchema, SessionTransport, TokenResponse, TokenResponse as TokenResponse$1, UserInfo, UserInfo as UserInfo$1 } from "@infoteam/account-core";
|
|
1
|
+
import { AccountError, AccountErrorCode, AccountMetadata, AccountMetadata as AccountMetadata$1, ClientScope, ClientScope as ClientScope$1, ENVIRONMENTS, Environment, ExchangeCodeParams, ExchangeCodeParams as ExchangeCodeParams$1, INVALID_TICKET, IdTokenClaims, IdTokenClaims as IdTokenClaims$1, IssuerInput, IssuerInput as IssuerInput$1, LoginCodeBodySchema, LoginRequestBody, LoginTicketBodySchema, RevokeParams, RevokeParams as RevokeParams$1, SESSION_REJECTED, Scope, SessionRejectedResponse, SessionTokensResponse, SessionTokensResponseSchema, SessionTransport, TokenResponse, TokenResponse as TokenResponse$1, UserInfo, UserInfo as UserInfo$1 } from "@infoteam/account-core";
|
|
2
2
|
import * as z from "zod/mini";
|
|
3
3
|
//#region src/options.d.ts
|
|
4
4
|
/** 값은 보통 환경 변수에서 오므로, 첫 요청이 아니라 서버가 시작될 때 검증한다. */
|
|
@@ -90,4 +90,4 @@ type LookedUpUser<A extends Pick<AccountServer, 'getUserInfoBySub'>> = NonNullab
|
|
|
90
90
|
/** @throws {@link AccountError} 옵션이 없거나 비어 있으면 `invalid_request`. */
|
|
91
91
|
export declare function createAccountServer<const RequiredScopes extends readonly ClientScope$1[] = [], const LookupScopes extends readonly ClientScope$1[] = []>(input: AccountServerOptions<RequiredScopes, LookupScopes>): AccountServer<RequiredScopes[number], LookupScopes[number]>;
|
|
92
92
|
//#endregion
|
|
93
|
-
export { AccountError, type AccountErrorCode, type AccountMetadata, type AccountServer, type AccountServerOptions, type AuthenticationRequirement, type ClientScope, ENVIRONMENTS, type Environment, type ExchangeCodeParams, type IdTokenClaims, type IssuerInput, type LoggedInUser, LoginCodeBodySchema, type LoginRequestBody, LoginTicketBodySchema, type LoginWithCodeParams, type LookedUpUser, type RevokeParams, SESSION_REJECTED, type Scope, type SessionRejectedResponse, type SessionTokensResponse, SessionTokensResponseSchema, type SessionTransport, type TokenResponse, type UserInfo };
|
|
93
|
+
export { AccountError, type AccountErrorCode, type AccountMetadata, type AccountServer, type AccountServerOptions, type AuthenticationRequirement, type ClientScope, ENVIRONMENTS, type Environment, type ExchangeCodeParams, INVALID_TICKET, type IdTokenClaims, type IssuerInput, type LoggedInUser, LoginCodeBodySchema, type LoginRequestBody, LoginTicketBodySchema, type LoginWithCodeParams, type LookedUpUser, type RevokeParams, SESSION_REJECTED, type Scope, type SessionRejectedResponse, type SessionTokensResponse, SessionTokensResponseSchema, type SessionTransport, type TokenResponse, type UserInfo };
|
package/dist/index.js
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { AccountError, AccountError as AccountError$1, CLIENT_TOKEN_REFRESH_MARGIN_MS, ClientScopeSchema, ENVIRONMENTS, LoginCodeBodySchema, LoginTicketBodySchema, SESSION_REJECTED, SessionTokensResponseSchema, discover, exchangeCode, fetchClientRegistration, fetchUserInfo, requestClientCredentials, revokeToken, userInfoFromIdToken, verifyIdToken } from "@infoteam/account-core";
|
|
1
|
+
import { AccountError, AccountError as AccountError$1, CLIENT_TOKEN_REFRESH_MARGIN_MS, ClientScopeSchema, ENVIRONMENTS, INVALID_TICKET, LoginCodeBodySchema, LoginTicketBodySchema, SESSION_REJECTED, SessionTokensResponseSchema, discover, exchangeCode, fetchClientRegistration, fetchUserInfo, requestClientCredentials, revokeToken, userInfoFromIdToken, verifyIdToken } from "@infoteam/account-core";
|
|
2
2
|
import * as z from "zod/mini";
|
|
3
3
|
import { Mutex, isFunction, isString } from "es-toolkit";
|
|
4
4
|
//#region src/client-token-cache.ts
|
|
@@ -124,4 +124,4 @@ function checkAuthentication(claims, { maxAge, amr }) {
|
|
|
124
124
|
if (amr && !amr.some((method) => claims.amr?.includes(method))) throw new AccountError$1("insufficient_authentication", { description: `the IdP login used ${claims.amr?.join(" ") || "an unknown method"}, not ${amr.join(" or ")}` });
|
|
125
125
|
}
|
|
126
126
|
//#endregion
|
|
127
|
-
export { AccountError, AccountServerOptionsSchema, ENVIRONMENTS, LoginCodeBodySchema, LoginTicketBodySchema, SESSION_REJECTED, SessionTokensResponseSchema, createAccountServer };
|
|
127
|
+
export { AccountError, AccountServerOptionsSchema, ENVIRONMENTS, INVALID_TICKET, LoginCodeBodySchema, LoginTicketBodySchema, SESSION_REJECTED, SessionTokensResponseSchema, createAccountServer };
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@infoteam/account-server",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.10.0",
|
|
4
4
|
"description": "Backend client for the Infoteam account IdP: code exchange with id_token login and user lookup with client credentials",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"type": "module",
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"node": ">=20.19"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@infoteam/account-core": "^0.
|
|
34
|
+
"@infoteam/account-core": "^0.10.0",
|
|
35
35
|
"es-toolkit": "^1.52.0"
|
|
36
36
|
},
|
|
37
37
|
"peerDependencies": {
|