Skip to main content

Module oauth

Module oauth 

Source

StructsΒ§

GetAuthorizationQuery πŸ”’
GET /xrpc/bot.did.getAuthorization’s query parameters.
Issued πŸ”’
What issue_approval issued.
ListPendingAuthorizationsQuery πŸ”’
GET /xrpc/bot.did.listPendingAuthorizations’s query parameters.
OAuthAuthorizeQuery πŸ”’
GET /oauth/authorize’s query parameters.
OAuthBrowserQuery πŸ”’
GET /oauth/browser’s query parameters.
OAuthParForm πŸ”’
The wire fields POST /oauth/par accepts, form-encoded per RFC 9126.
OAuthTokenForm πŸ”’
The wire fields POST /oauth/token accepts, form-encoded per RFC 6749 Β§4.
Refused πŸ”’
An OAuth refusal on its way out: what the client is sent, and how the journal says it. See crate::refusal.

ConstantsΒ§

MAX_AUTHORIZATION_WAIT
How long bot.did.listPendingAuthorizations will hold a request open.

FunctionsΒ§

approve_authorization πŸ”’
POST /xrpc/bot.did.approveAuthorization
authenticated_client πŸ”’
The confidential client a POST /oauth/token request authenticated as, or None when it carries no client assertion.
authorize_answer πŸ”’
Everything oauth_authorize answers, before the header every answer carries.
authorize_error πŸ”’
authorize_error_page πŸ”’
The page oauth_authorize answers when err stops it before it finds a sign-in to show.
authorize_page πŸ”’
The page GET /oauth/authorize serves for one decision.
browser_answer πŸ”’
Everything oauth_browser answers, before the headers every answer carries.
browser_list πŸ”’
The accounts a browser is signed in as, and the cookie again when it presented an id its session has since replaced.
checked_proof πŸ”’
The DPoP proof a request to this authorization server carries, checked against the absolute URL of path on this deployment.
confirm_remembered πŸ”’
Approves the sign-in request_uri names without asking the account, when this load meets every rule of crate::oauth::authorize::confirms_unasked and the e-stop is clear. crate::oauth::authorize::answer then hands this browser the code.
create_browser_sign_in πŸ”’
POST /xrpc/bot.did.createBrowserSignIn
decision_by_token πŸ”’
Reads one decision by its approval token, for the account the presented credential authenticates as.
decline_authorization πŸ”’
POST /xrpc/bot.did.declineAuthorization
deployment_did πŸ”’
This deployment’s own DID, as a policy subject names it: empty before the zone’s document exists.
followed_from_here πŸ”’
Whether Sec-Fetch-Site lets a sign-in link through: absent, none for a link a person or a tool opened directly, or same-origin.
get_authorization πŸ”’
GET /xrpc/bot.did.getAuthorization
issue_approval πŸ”’
Approves record for did by spending token: issues the code, builds the client’s redirect, and settles the record, holding the redirect when a browser carries it.
landing_headers πŸ”’
response, uncached and under the landing page’s content security policy, as every answer from the two sign-in routes is, a redirect too.
list_pending_authorizations πŸ”’
GET /xrpc/bot.did.listPendingAuthorizations
never_cached πŸ”’
Marks every answer from POST /oauth/par and POST /oauth/token uncacheable, success and refusal alike.
oauth_authorize πŸ”’
GET /oauth/authorize
oauth_browser πŸ”’
GET /oauth/browser
oauth_par πŸ”’
POST /oauth/par
oauth_protected_resource_metadata πŸ”’
GET /.well-known/oauth-protected-resource
oauth_server_metadata πŸ”’
GET /.well-known/oauth-authorization-server
oauth_token πŸ”’
POST /oauth/token
oauth_token_response πŸ”’
on_issuer_host πŸ”’
Whether a request was made to the issuer’s own host, as its Host or its HTTP/2 authority names it.
par_refusal πŸ”’
What a refused push answers, and how loudly it is written.
pending_authorizations πŸ”’
The one answer shape bot.did.listPendingAuthorizations has, built in one place so the wait’s three exits cannot drift apart.
see_other πŸ”’
303 See Other to location, which a browser follows with a GET whatever method brought it here. placeholder heads the page if it cannot.
token_refusal πŸ”’
What a refused exchange or refresh answers, and how loudly it is written.
too_many_oauth_requests πŸ”’
The 429 the unauthenticated OAuth endpoints answer with; see OAuthError::rate_limited.
with_browser_cookie πŸ”’
response, setting crate::oauth::browser::COOKIE to browser’s current session id. placeholder heads the page if it cannot.