Skip to main content

Module github_auth

Module github_auth 

Source
Expand description

github_auth API (re-exported at this path).

Structs§

DeviceAuthorization
The device and user codes GitHub issued in step 1 of the flow.
DeviceFlow
A GitHub OAuth device-flow client for one OAuth App.
SystemPollClock
PollClock backed by Instant::now and std::thread::sleep.

Enums§

DeviceFlowError
Ways the device flow can fail.
DeviceFlowStep
Which request of the flow failed at the transport level.
PollStatus
Result of one poll of the token endpoint that did not end the flow.

Constants§

ACCESS_TOKEN_URL
GitHub endpoint polled for the access token.
DEFAULT_SCOPE
OAuth scope requested by default. repo covers fetching and pushing private repositories over HTTPS.
DEVICE_CODE_URL
GitHub endpoint that issues device and user codes.
GITHUB_HOST
Host name of GitHub’s web and Git endpoints.
TOKEN_USERNAME
Placeholder username GitHub documents for token authentication over HTTPS; GitHub authenticates by the token (the password) regardless of the name.
VERIFICATION_URL
Page where the user enters the code; used when GitHub omits verification_uri from its response.

Traits§

PollClock
Time source and sleeper for DeviceFlow::wait_for_token.

Functions§

github_token_credential
The credential under which a GitHub token is stored for HTTPS Git access.
is_github_https_url
Whether url is an https:// URL whose host is github.com (or www.github.com), ignoring case, userinfo and port.