@happyvertical/smrt-users 0.69.0 → 0.70.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +7 -0
- package/agents/oauth-authorization.md +13 -3
- package/agents/permissions.md +17 -0
- package/dist/chunks/{PasswordCredentialService-Dec3bz4G.js → PasswordCredentialService-BjobA5uG.js} +22 -731
- package/dist/chunks/PasswordCredentialService-BjobA5uG.js.map +1 -0
- package/dist/chunks/PermissionCatalogService-DcmTn38P.js +716 -0
- package/dist/chunks/PermissionCatalogService-DcmTn38P.js.map +1 -0
- package/dist/chunks/PostgresPermissionPolicies-RzCLuARk.js +314 -0
- package/dist/chunks/PostgresPermissionPolicies-RzCLuARk.js.map +1 -0
- package/dist/chunks/{TerminalAuthService-Bf90h-rh.js → TerminalAuthService-CIdx-ed9.js} +48 -30
- package/dist/chunks/TerminalAuthService-CIdx-ed9.js.map +1 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +43 -289
- package/dist/index.js.map +1 -1
- package/dist/manifest.json +1 -1
- package/dist/operator.js +1 -1
- package/dist/postgres-policies.d.ts +8 -0
- package/dist/postgres-policies.d.ts.map +1 -0
- package/dist/postgres-policies.js +2 -0
- package/dist/postgres-settings.d.ts +26 -0
- package/dist/postgres-settings.d.ts.map +1 -0
- package/dist/postgres-settings.js +18 -0
- package/dist/postgres-settings.js.map +1 -0
- package/dist/services/OAuthAuthorizationService.d.ts +27 -1
- package/dist/services/OAuthAuthorizationService.d.ts.map +1 -1
- package/dist/services/OperationPermissionService.d.ts +7 -2
- package/dist/services/OperationPermissionService.d.ts.map +1 -1
- package/dist/services/PostgresPermissionPolicies.d.ts +40 -1
- package/dist/services/PostgresPermissionPolicies.d.ts.map +1 -1
- package/dist/services/SessionPermissionContext.d.ts +2 -8
- package/dist/services/SessionPermissionContext.d.ts.map +1 -1
- package/dist/services/index.d.ts +2 -2
- package/dist/services/index.d.ts.map +1 -1
- package/dist/smrt-knowledge.json +9 -7
- package/dist/smrt-knowledge.okf.md +4 -2
- package/dist/sveltekit/oauth-handlers.d.ts +1 -1
- package/dist/sveltekit/oauth-handlers.d.ts.map +1 -1
- package/dist/sveltekit.js +10 -4
- package/dist/sveltekit.js.map +1 -1
- package/package.json +17 -9
- package/dist/chunks/PasswordCredentialService-Dec3bz4G.js.map +0 -1
- package/dist/chunks/TerminalAuthService-Bf90h-rh.js.map +0 -1
package/dist/sveltekit.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { M as LoginRateLimitError, d as PasswordCredentialForbiddenError, f as PasswordCredentialService, g as SessionService, p as PasswordPolicyError, u as PasswordCredentialError } from "./chunks/PasswordCredentialService-
|
|
2
|
-
import { B as OidcLoginService, C as PasskeyCredentialService, D as OperationPermissionError, F as MobileAuthError, H as encodeOidcTransaction, I as MobileAuthService, J as DeviceCredentialError, L as readMobileBearerToken, P as withSessionPermissionContext, R as validateMobileRedirectUri, S as PasskeyCredentialForbiddenError, T as PasskeyRegistrationError, U as getUsersOidcConfig, V as decodeOidcTransaction, W as resolveOidcProviderConfig, X as DeviceCredentialPolicyError, Y as DeviceCredentialForbiddenError, Z as DeviceCredentialService, a as TerminalAuthError, o as TerminalAuthRateLimitError, s as TerminalAuthService, w as PasskeyReauthenticationRequiredError, x as PasskeyCredentialError, z as OidcLoginError } from "./chunks/TerminalAuthService-
|
|
1
|
+
import { M as LoginRateLimitError, d as PasswordCredentialForbiddenError, f as PasswordCredentialService, g as SessionService, p as PasswordPolicyError, u as PasswordCredentialError } from "./chunks/PasswordCredentialService-BjobA5uG.js";
|
|
2
|
+
import { B as OidcLoginService, C as PasskeyCredentialService, D as OperationPermissionError, F as MobileAuthError, H as encodeOidcTransaction, I as MobileAuthService, J as DeviceCredentialError, L as readMobileBearerToken, P as withSessionPermissionContext, R as validateMobileRedirectUri, S as PasskeyCredentialForbiddenError, T as PasskeyRegistrationError, U as getUsersOidcConfig, V as decodeOidcTransaction, W as resolveOidcProviderConfig, X as DeviceCredentialPolicyError, Y as DeviceCredentialForbiddenError, Z as DeviceCredentialService, a as TerminalAuthError, o as TerminalAuthRateLimitError, s as TerminalAuthService, w as PasskeyReauthenticationRequiredError, x as PasskeyCredentialError, z as OidcLoginError } from "./chunks/TerminalAuthService-CIdx-ed9.js";
|
|
3
3
|
import { DiscoveryArtifactValidationError, SMRT_APP_RESULT_CONTRACT, SMRT_APP_RESULT_SCHEMA, SMRT_APP_RESULT_VERSION, SMRT_DISCOVERY_CONFORMANCE_ARTIFACT_SCHEMA, SMRT_DISCOVERY_CONFORMANCE_SCHEMA, SMRT_DISCOVERY_CONFORMANCE_VERSION, SMRT_MCP_RESULT_METADATA_KEY, canonicalizeDiscoveryArtifact, createDiscoveryConformanceArtifact, deriveCommandRequirements, validateDiscoveryConformanceArtifact } from "./app-contract.js";
|
|
4
4
|
import { ObjectRegistry, createClassNamePredicate, resolveCustomActionMetadata, resolveEffectiveActionMetadata } from "@happyvertical/smrt-core";
|
|
5
5
|
import { createLogger } from "@happyvertical/logger";
|
|
@@ -1202,11 +1202,17 @@ function createOAuthHandlers(options) {
|
|
|
1202
1202
|
return id;
|
|
1203
1203
|
};
|
|
1204
1204
|
return {
|
|
1205
|
-
/**
|
|
1205
|
+
/** Validated client info for the consent page; `scopes` is what consent would grant. */
|
|
1206
1206
|
authorize: (event) => guarded(async () => {
|
|
1207
1207
|
const id = await session(event);
|
|
1208
1208
|
await options.authorization.listGrants(id);
|
|
1209
|
-
|
|
1209
|
+
const parsed = await options.server.parseAuthorizationRequest(event.url.searchParams);
|
|
1210
|
+
const { requested, granted } = await options.authorization.consentScopes(parsed, id);
|
|
1211
|
+
return json({
|
|
1212
|
+
...parsed,
|
|
1213
|
+
scopes: granted,
|
|
1214
|
+
...granted.length === requested.length ? {} : { requestedScopes: requested }
|
|
1215
|
+
});
|
|
1210
1216
|
}),
|
|
1211
1217
|
/** A successful POST requires same-origin explicit approval and a fresh session. */
|
|
1212
1218
|
consent: (event) => guarded(async () => {
|