Skip to main content

Module remote

Module remote 

Source
Expand description

Remote review store configuration and its bearer token.

The remote is configured only by $STATE/remote.json and the environment, never by index.artf. Callers must never print or log the token.

Structs§

Failure
Principal
Remote
A resolved remote; its token is private and never serialized.
Status
What remote status reports: where the remote is, what it shares, where its token comes from, and whether the store answers to it. Never the token.

Enums§

Connection
What asking the store who the token belongs to came to.
Scope
A permission a remote token grants, as the server names it. A scope this version does not know is kept by its name, so it is still shown, but it grants nothing here.
Share
TokenSource

Constants§

CONFIG

Functions§

login
Verify a token from stdin against the store, then save it and remote.json.
logout
Forget the stored token and remote.json; the server keeps the token until revoked.
parse_url
Accept HTTPS, or plain HTTP only on loopback; never credentials, queries or fragments.
remote
Resolve the remote from the environment and $STATE/remote.json without network access. None means no remote is configured or ARTIFACTIZE_REMOTE=off.
status
Resolve the remote and ask the store who its token belongs to; None when no remote is configured (or ARTIFACTIZE_REMOTE=off).