SudregEx.Auth (sudreg_ex v0.1.0)

Copy Markdown View Source

OAuth2 client-credentials authentication against the Sudski registar token endpoint.

fetch_token/1 always performs a network request; use SudregEx.TokenCache for cached, refresh-on-expiry access.

Summary

Functions

Exchanges the client's credentials for a bearer token via the OAuth2 client-credentials grant.

Functions

fetch_token(client)

@spec fetch_token(SudregEx.Client.t()) ::
  {:ok, SudregEx.Token.t()} | {:error, SudregEx.Error.t()}

Exchanges the client's credentials for a bearer token via the OAuth2 client-credentials grant.