Skip to main content

Module environment

Module environment 

Source
Expand description

What the authorization flow needs from the outside world.

The flow in authorizer is decisions: which document to read next, which client to present, which scope to ask for. Everything it cannot decide by itself — fetching a URL, sending the user somewhere, trading a code for a token — it asks of an OAuthEnvironment, so the flow runs unchanged against a test double, a headless agent, or a person with a browser.

The port belongs to its consumer, here, and returns this module’s errors: an adapter maps reqwest and the operating system’s failures to them at the boundary, and nothing above names a third-party type.

Structs§

Fetched
A response read in full.

Enums§

EnvironmentError
Why the environment could not do what it was asked.

Traits§

OAuthEnvironment
The outside world, as the authorization flow sees it.