KubeMQ.StaticTokenProvider (kubemq v1.0.1)

Copy Markdown View Source

Static token credential provider for KubeMQ authentication.

Returns a fixed token string. Useful for development or when tokens are managed externally and injected via environment variables.

Usage

{:ok, client} = KubeMQ.Client.start_link(
  address: "localhost:50000",
  client_id: "my-app",
  credential_provider: KubeMQ.StaticTokenProvider,
  auth_token: "my-jwt-token"
)

Summary

Functions

Returns the static token from the :auth_token key in opts.

Functions

get_token(opts)

@spec get_token(keyword()) :: {:ok, String.t()} | {:error, term()}

Returns the static token from the :auth_token key in opts.