Skip to main content

Module service_auth

Module service_auth 

Source
Expand description

com.atproto.server.getServiceAuth, and the rules a proxied call shares with it; see crate::proxy.

Both sign a service-auth token as an account, for another service to accept as that account calling it: the XRPC spec’s “Inter-Service Authentication”. The limits are the reference PDS’s (packages/pds/src/api/com/atproto/server/getServiceAuth.ts): how far out exp may be, the shorter bound on a token bound to no method, and the methods that get no token at all.

Structs§

Caller 🔒
Who a call at another service speaks for.
ServiceAuthQuery 🔒
The query getServiceAuth takes.

Constants§

MAX_AUD_BYTES 🔒
The longest aud the lexicon admits, in bytes.
MAX_LIFETIME
The furthest out a requested exp may be.
MAX_UNBOUND_LIFETIME
The furthest out a requested exp may be on a token bound to no method.
PATH 🔒
Where getServiceAuth is served, which a DPoP proof binds to.
PROTECTED_METHODS 🔒
Methods that manage an account, which get no service-auth token and are not proxied: the reference PDS’s PROTECTED_METHODS. Matched without regard to case, as it matches them.

Functions§

authorize 🔒
Resolves the credential on a call at another service, and checks that it may call lxm at aud.
bad_expiration 🔒
BadExpiration, the one error the lexicon declares.
expiry 🔒
When a token for exp stops being good: exp itself when it is in bounds, or DEFAULT_LIFETIME from now when the caller named none.
get_service_auth 🔒
GET /xrpc/com.atproto.server.getServiceAuth
is_audience 🔒
Whether aud is an atproto DID, or one with a service fragment.
is_fragment 🔒
Whether fragment is a non-empty RFC 3986 fragment, the syntax a DID URL’s service id takes.
is_protected 🔒
Whether lxm is one of PROTECTED_METHODS.
issue 🔒
sign 🔒
Signs token as did, through the registry that holds its key.