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.
Instance methods
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.