Client middleware¶
- class aiohttp_oauth2_client.middleware.OAuth2Middleware(grant: OAuth2Grant)[source]¶
Bases:
Callable
[ClientRequest
,Callable
[ClientRequest
,Awaitable
[ClientResponse
]],Awaitable
[ClientResponse
]]Client middleware to add OAuth2 access tokens in the authorization header of HTTP requests.
- Parameters:
grant (OAuth2Grant) –