Class: Mongo::Auth::ConversationBase Private
- Inherits:
-
Object
- Object
- Mongo::Auth::ConversationBase
- Defined in:
- lib/mongo/auth/conversation_base.rb
Overview
This class is part of a private API. You should avoid using this class if possible, as it may be removed or be changed in the future.
Defines common behavior around authentication conversations between the client and the server.
Direct Known Subclasses
Mongo::Auth::CR::Conversation, LDAP::Conversation, SaslConversationBase, X509::Conversation
Instance Attribute Summary collapse
-
#connection ⇒ Mongo::Connection
readonly
private
The connection to authenticate over.
-
#user ⇒ Auth::User
readonly
private
User The user for the conversation.
Instance Method Summary collapse
-
#initialize(user, connection, **opts) ⇒ ConversationBase
constructor
private
Create the new conversation.
-
#speculative_auth_document ⇒ Hash | nil
private
Returns the hash to provide to the server in the handshake as value of the speculativeAuthenticate key.
Constructor Details
#initialize(user, connection, **opts) ⇒ ConversationBase
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Create the new conversation.
29 30 31 32 |
# File 'lib/mongo/auth/conversation_base.rb', line 29 def initialize(user, connection, **opts) @user = user @connection = connection end |
Instance Attribute Details
#connection ⇒ Mongo::Connection (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns The connection to authenticate over.
38 39 40 |
# File 'lib/mongo/auth/conversation_base.rb', line 38 def connection @connection end |
#user ⇒ Auth::User (readonly)
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns user The user for the conversation.
35 36 37 |
# File 'lib/mongo/auth/conversation_base.rb', line 35 def user @user end |
Instance Method Details
#speculative_auth_document ⇒ Hash | nil
This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.
Returns the hash to provide to the server in the handshake as value of the speculativeAuthenticate key.
If the auth mechanism does not support speculative authentication, this method returns nil.
47 48 49 |
# File 'lib/mongo/auth/conversation_base.rb', line 47 def speculative_auth_document nil end |