Expand description
OAUTHBEARER tokens: the token provider seam, an OAuth 2 client credentials provider and a jwt-bearer client assertion provider (KIP-768), and a background refresh task for either.
Kafka’s OAuthBearerLoginCallbackHandler gets a token from a
JwtRetriever. ClientCredentialsJwtRetriever posts a
client_credentials grant to sasl.oauthbearer.token.endpoint.url,
JwtBearerJwtRetriever instead posts the
urn:ietf:params:oauth:grant-type:jwt-bearer grant with a signed client
assertion, and ExpiringCredentialRefreshingLogin fetches a new token
before the old one expires. spawn_background_refresh is this crate’s
equivalent of that last part.
Structs§
- Client
Credentials Config - The settings of
ClientCredentialsTokenProvider, as Kafka’sSaslConfigsnames them. - Client
Credentials Token Provider - An OAUTHBEARER token provider that uses the OAuth 2 client credentials
grant, as Kafka’s
ClientCredentialsJwtRetrieverwithClientSecretRequestFormatterdoes. - JwtBearer
Config - The settings of
JwtBearerTokenProvider, as Kafka’sSaslConfigsnames them. - JwtBearer
Token Provider - An OAUTHBEARER token provider that uses the OAuth 2 jwt-bearer grant with a
signed client assertion (RFC 7523), as Kafka’s
JwtBearerJwtRetrieverwithJwtBearerRequestFormatterdoes.
Constants§
- DEFAULT_
LOGIN_ REFRESH_ BUFFER - Kafka’s
sasl.login.refresh.buffer.secondsdefault. - DEFAULT_
LOGIN_ REFRESH_ MIN_ PERIOD - Kafka’s
sasl.login.refresh.min.period.secondsdefault. - DEFAULT_
LOGIN_ REFRESH_ WINDOW_ FACTOR - Kafka’s
sasl.login.refresh.window.factordefault. - DEFAULT_
LOGIN_ REFRESH_ WINDOW_ JITTER - Kafka’s
sasl.login.refresh.window.jitterdefault. - DEFAULT_
LOGIN_ RETRY_ BACKOFF - Kafka’s
sasl.login.retry.backoff.msdefault. - DEFAULT_
LOGIN_ RETRY_ BACKOFF_ MAX - Kafka’s
sasl.login.retry.backoff.max.msdefault.
Traits§
- OAuth
Bearer Token Provider - A source of OAUTHBEARER tokens, as Kafka’s
sasl.login.callback.handler.classwith anOAuthBearerTokenCallbackis.
Functions§
- spawn_
background_ refresh - Starts a background task that keeps
provider’s token fresh.
Type Aliases§
- Refresh
Future - The future of
OAuthBearerTokenProvider::refresh_at. - Token
Future - The future of
OAuthBearerTokenProvider::token.