You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Add device_auth_flow/4,5 to hex_api_oauth
Add a high-level function that handles the complete OAuth device
authorization flow: initiating authorization, prompting the user,
and polling for token completion.
- Add oauth_tokens/0 and device_auth_error/0 types
- Handle slow_down, authorization_pending, expired_token, and
access_denied responses during polling
* Add trusted and oauth_exchange config options
Add config options for hex_cli_auth authentication handling:
- trusted: whether the repo connection is trusted for auth_key usage
- oauth_exchange: whether to exchange api_key/auth_key for OAuth tokens
- oauth_exchange_url: optional custom URL for OAuth token exchange
* Add hex_cli_auth module for CLI authentication handling
Provides callback-based authentication for build tools (rebar3, Mix)
with shared auth logic and customizable prompting/persistence.
Features:
- with_api/4,5 and with_repo/3,4 wrappers for authenticated requests
- resolve_api_auth/3 and resolve_repo_auth/2 for credential resolution
- Auth resolution order: config, per-repo keys, parent repo, OAuth
- OAuth token exchange via client_credentials grant
- Automatic token refresh when expired
- OTP/TOTP prompt handling with retry logic
- Device auth flow for interactive authentication
- Support for trusted/untrusted repo connections
Includes comprehensive test suite covering:
- API and repo auth resolution
- Trusted vs untrusted scenarios
- OAuth token exchange (new, valid, expired)
- OTP prompts and retries
- Token refresh on 401
- Device auth flow
* Fix body type to represent all JSON value types
* Add reauthentication
* Allow Token Refresh Error with Repo Read & Optional
* Move cli_auth callbacks into config map
Instead of passing callbacks as a separate argument to each
hex_cli_auth function, they now live under the `cli_auth_callbacks`
key in the config map. This reduces function arity and gives
callers a single place to configure hex_core.
0 commit comments