Skip to main content

Module account

Module account 

Source
Expand description

bynk login, bynk logout and bynk org (first-party registry R3.1, #2378): the client side of the account API the hosted registry serves beside its publish API (R3, #2363).

login runs GitHub’s device flow through the registry and keeps the account token (bynka_…) in the credentials file’s [accounts.<name>], apart from the publish token bynk publish reads from [registries.<name>] token. org token mint --save writes a new publish token into the organisation’s own slot, [registries.<name>.organisations.<org>] token (R3.2, #2383).

Structs§

Mint
What token mint is asked for.
Target
Which registry a command talks to: --registry, else the one the organisation routes to in the project at project (login and logout have no organisation, and default to the first-party registry).

Functions§

claim
Claim org, first come (block holds it without publishing; an operator names the owner).
login
Sign in to target’s registry through GitHub’s device flow, and keep the account token.
logout
Sign out of target’s registry: end the session on the server, and forget it here.
member_add
Add the GitHub user login to org.
member_remove
Remove a member from org, by GitHub login or numeric id.
override_variable
BYNK_ACCOUNT_<NAME>_TOKEN. Not BYNK_REGISTRY_<NAME>_ACCOUNT_TOKEN, which is registry <name>-account’s publish token.
set_blocked
Block or unblock org.
show
Print org: its owner, members, whether it is blocked, and its tokens (never the tokens themselves). json prints the API’s answer as it is.
token_mint
Mint a publish token for org: printed once on stdout, or saved where bynk publish reads it (decision E).
token_revoke
Revoke one of org’s publish tokens, by its id (or a unique prefix of it, as org show prints it).