import { HttpHandler, type HttpHandlerInput } from '@solid/community-server'; export interface DisabledIdentityProviderHandlerOptions { /** 禁用原因说明 */ message?: string; /** 是否保留某些只读端点 */ allowReadOnly?: boolean; } /** * Disabled Identity Provider Handler * * 用于 SP (Storage Provider) 模式,禁用本地账户管理功能。 * * 行为: * - 拒绝所有账户注册请求 * - 拒绝所有登录请求 * - 拒绝所有密码重置请求 * - 可选:保留某些只读端点(如账户信息查询) * * 这样用户必须通过外部 IdP 进行身份验证,SP 只负责存储。 */ export declare class DisabledIdentityProviderHandler extends HttpHandler { private readonly logger; private readonly message; private readonly allowReadOnly; private readonly identityPaths; private readonly readOnlyPaths; constructor(options?: DisabledIdentityProviderHandlerOptions); /** * 处理账户管理请求 * * 默认拒绝所有请求,返回 501 Not Implemented */ canHandle({ request }: HttpHandlerInput): Promise; /** * handle 方法理论上不会被执行,因为 canHandle 总是抛出异常 * 但为了完整性,保留此方法 */ handle({ response }: HttpHandlerInput): Promise; /** * 检查是否是账户管理路径 */ private isIdentityPath; /** * 检查是否是只读路径 */ private isReadOnlyPath; /** * 从 URL 提取 pathname */ private getPathname; }