testing/resolved_auth.ts

Test factory for ResolvedAuth — the credential the auth middleware chain resolves, built directly for harnesses that preset it on a Hono context (RESOLVED_AUTH_KEY) instead of running the middleware.

view source

Declarations
#

2 declarations

create_test_resolved_auth
#

TestResolvedAuthOptions
#

testing/resolved_auth.ts view source

TestResolvedAuthOptions import type {TestResolvedAuthOptions} from '@fuzdev/fuz_app/testing/resolved_auth.js';

credential_type

type BuiltinCredentialType

account_id

type string

session_id?

The raw session token a session credential carries, hashed into its session_hash the way the session leg hashes the cookie's. Default a fresh uuid. Ignored for other credential types.

type string

api_token_id?

The api_token credential's token id. Default a fresh uuid. Ignored for other credential types.

type string

scope?

The api_token credential's scope. Default full. Ignored for other credential types.

type TokenScope

credential_deadline?

The credential deadline. Default null; always null for a daemon token.

type number | null

Depends on
#

Imported by
#