class

Crabbit::OAuth2SaslAuthenticator

Inherits Crabbit::SaslAuthenticator < Reference < Object

Shared SASL PLAIN authenticator backed by an OAuth 2 token provider.

Configuration creates one instance automatically from OAuth2Config and shares it across every environment connection. Construct it directly when supplying a custom OAuth2TokenProvider.

Constructors

new(config : OAuth2Config, provider : OAuth2TokenProvider = OAuth2HttpTokenProvider.new(config))

Creates an authenticator using provider for token retrieval.

Source

Instance methods

config

Returns the OAuth 2 refresh configuration.

Source
initial_response

Returns a PLAIN initial response containing the current bearer token.

The token is retrieved lazily and refreshed if expired. Environment connections additionally register for proactive live re-authentication.

Source
mechanism

Returns "PLAIN", the RabbitMQ OAuth 2 SASL transport mechanism.

Source