class
Crabbit::OAuth2SaslAuthenticator
- Crabbit::OAuth2SaslAuthenticator
- Crabbit::SaslAuthenticator
- Reference
- Object
Overview
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.
Defined in:
crabbit/oauth2.crConstructors
-
.new(config : OAuth2Config, provider : OAuth2TokenProvider = OAuth2HttpTokenProvider.new(config))
Creates an authenticator using provider for token retrieval.
Instance Method Summary
-
#config : OAuth2Config
Returns the OAuth 2 refresh configuration.
-
#initial_response : Bytes
Returns a PLAIN initial response containing the current bearer token.
-
#mechanism : String
Returns
"PLAIN", the RabbitMQ OAuth 2 SASL transport mechanism.
Instance methods inherited from class Crabbit::SaslAuthenticator
challenge(data : Bytes) : Bytes
challenge,
initial_response : Bytes
initial_response,
mechanism : String
mechanism
Constructor Detail
Creates an authenticator using provider for token retrieval.
Instance Method Detail
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.