ExAzureCore.Http.Plugins.BearerToken (ex_azure_core v0.2.0)

Copy Markdown

Req plugin that adds Bearer token authentication to requests.

Integrates with ExAzureCore.Auth.TokenServer to fetch and manage access tokens for Azure services.

Options

  • :credential - TokenServer name (atom) to fetch tokens from
  • :token - Static token string (alternative to credential)

Example

# Using a TokenServer
req = Req.new()
|> ExAzureCore.Http.Plugins.BearerToken.attach(credential: :my_azure_credential)

# Using a static token
req = Req.new()
|> ExAzureCore.Http.Plugins.BearerToken.attach(token: "eyJ...")

Summary

Functions

Attaches the bearer token plugin to a Req request.

Functions

attach(request, opts \\ [])

@spec attach(
  Req.Request.t(),
  keyword()
) :: Req.Request.t()

Attaches the bearer token plugin to a Req request.