Fix scope
This commit is contained in:
@@ -1,12 +1,12 @@
|
||||
/**
|
||||
* Authorization helpers for API routes
|
||||
*
|
||||
* Thin wrappers around @emdashcms/auth RBAC that return HTTP responses.
|
||||
* Thin wrappers around @emdash-cms/auth RBAC that return HTTP responses.
|
||||
* Auth middleware handles authentication; these handle authorization.
|
||||
*/
|
||||
|
||||
import type { Permission, RoleLevel } from "@emdashcms/auth";
|
||||
import { hasPermission, canActOnOwn } from "@emdashcms/auth";
|
||||
import type { Permission, RoleLevel } from "@emdash-cms/auth";
|
||||
import { hasPermission, canActOnOwn } from "@emdash-cms/auth";
|
||||
|
||||
import { apiError } from "./error.js";
|
||||
|
||||
|
||||
@@ -6,11 +6,11 @@
|
||||
* The user opens a browser, logs in, enters the code, and the CLI gets
|
||||
* an access + refresh token pair.
|
||||
*
|
||||
* Uses arctic for code generation and @emdashcms/auth for token utilities.
|
||||
* Uses arctic for code generation and @emdash-cms/auth for token utilities.
|
||||
*/
|
||||
|
||||
import { clampScopes } from "@emdashcms/auth";
|
||||
import type { RoleLevel } from "@emdashcms/auth";
|
||||
import { clampScopes } from "@emdash-cms/auth";
|
||||
import type { RoleLevel } from "@emdash-cms/auth";
|
||||
import { generateCodeVerifier } from "arctic";
|
||||
import type { Kysely } from "kysely";
|
||||
|
||||
|
||||
@@ -4,12 +4,12 @@
|
||||
* Implements the server side of the authorization code grant for MCP clients
|
||||
* (Claude Desktop, VS Code, etc.) per the MCP authorization spec (draft).
|
||||
*
|
||||
* Uses arctic for PKCE challenge generation and @emdashcms/auth for token
|
||||
* Uses arctic for PKCE challenge generation and @emdash-cms/auth for token
|
||||
* utilities. Token infrastructure is shared with the device flow.
|
||||
*/
|
||||
|
||||
import { clampScopes, computeS256Challenge } from "@emdashcms/auth";
|
||||
import type { RoleLevel } from "@emdashcms/auth";
|
||||
import { clampScopes, computeS256Challenge } from "@emdash-cms/auth";
|
||||
import type { RoleLevel } from "@emdash-cms/auth";
|
||||
import { generateCodeVerifier } from "arctic";
|
||||
import type { Kysely } from "kysely";
|
||||
|
||||
|
||||
@@ -6,7 +6,7 @@
|
||||
* role and reject disabled users.
|
||||
*/
|
||||
|
||||
import { toRoleLevel, type RoleLevel } from "@emdashcms/auth";
|
||||
import { toRoleLevel, type RoleLevel } from "@emdash-cms/auth";
|
||||
import type { Kysely } from "kysely";
|
||||
|
||||
import type { Database } from "../../database/types.js";
|
||||
|
||||
@@ -3,7 +3,7 @@ import { z } from "zod";
|
||||
import { roleLevel } from "./common.js";
|
||||
|
||||
// ---------------------------------------------------------------------------
|
||||
// WebAuthn credential schemas (matching @emdashcms/auth/passkey types)
|
||||
// WebAuthn credential schemas (matching @emdash-cms/auth/passkey types)
|
||||
// ---------------------------------------------------------------------------
|
||||
|
||||
const authenticatorTransport = z.enum(["usb", "nfc", "ble", "internal", "hybrid"]);
|
||||
|
||||
Reference in New Issue
Block a user