module

ActionMCP::Gateway

Class methods

auth_required?
Source
authenticate(request : HTTP::Request) : ApiKey | Nil

Authenticate the request; nil result → the controller writes 401.

Source
authenticator
Source
authenticator=(authenticator : Proc(String, ApiKey | Nil) | Nil)
Source
bearer_token(request : HTTP::Request) : String | Nil

Bearer token from the request, or nil.

Source
cache
Source
cache=(cache : ActiveSupport::Cache::Store)
Source
count_usage(key : ApiKey) : Nil
Source
quota_exceeded?(key : ApiKey) : Bool

Quota check (fixed window from the first request — Cache#increment keeps the entry's original expiry). True → over quota.

Source
quota_limit
Source
quota_limit=(quota_limit : Int32 | Nil)
Source
quota_within
Source
quota_within=(quota_within : Time::Span | Nil)
Source
usage_for(identity : String) : Int32

Usage counter for a key identity — the billing recurring job's input.

Source