Skip to main content

auser

Retrieves the user associated with the request asynchronously, caching the result on the request object to prevent redundant lookups.

def auser(
request: HttpRequest
) - > User

Asynchronously retrieves and caches the user associated with the current request to prevent redundant authentication lookups.

Parameters

NameTypeDescription
requestHttpRequestThe incoming HTTP request object where the authenticated user is cached.

Returns

TypeDescription
UserThe authenticated user object associated with the request, retrieved from the authentication backend or the local request cache.