Buckets:
ktongue/docker_container / .cache /opencode /node_modules /@openauthjs /openauth /src /provider /provider.ts
| import type { Context, Hono } from "hono" | |
| import { StorageAdapter } from "../storage/storage.js" | |
| export type ProviderRoute = Hono | |
| export interface Provider<Properties = any> { | |
| type: string | |
| init: (route: ProviderRoute, options: ProviderOptions<Properties>) => void | |
| client?: (input: { | |
| clientID: string | |
| clientSecret: string | |
| params: Record<string, string> | |
| }) => Promise<Properties> | |
| } | |
| export interface ProviderOptions<Properties> { | |
| name: string | |
| success: ( | |
| ctx: Context, | |
| properties: Properties, | |
| opts?: { | |
| invalidate?: (subject: string) => Promise<void> | |
| }, | |
| ) => Promise<Response> | |
| forward: (ctx: Context, response: Response) => Response | |
| set: <T>(ctx: Context, key: string, maxAge: number, value: T) => Promise<void> | |
| get: <T>(ctx: Context, key: string) => Promise<T> | |
| unset: (ctx: Context, key: string) => Promise<void> | |
| invalidate: (subject: string) => Promise<void> | |
| storage: StorageAdapter | |
| } | |
| export class ProviderError extends Error {} | |
| export class ProviderUnknownError extends ProviderError {} | |
Xet Storage Details
- Size:
- 1.05 kB
- Xet hash:
- acadf97f0be005505d8dcdfc22c13b69c7a6534dd451c9f81ee05e7e889fb365
·
Xet efficiently stores files, intelligently splitting them into unique chunks and accelerating uploads and downloads. More info.