Skip to main content
Context helpers for accessing authentication in tools.

get_access_token

function get_access_token

Get the current authenticated user’s access token.Returns None if the request is not authenticated.Example:
Returns
AccessToken | None
Signature

require_auth

function require_auth

Get the access token or raise AuthenticationError if not authenticated.Example:
Returns
AccessToken
Signature

set_access_token

function set_access_token

Set the current access token (called by AuthMiddleware).
Parameters
AccessToken | None
required
Parameter value
Signature