Class: Mongo::Auth::Base Private
- Inherits:
-
Object
- Object
- Mongo::Auth::Base
- Defined in:
- lib/mongo/auth/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.
Base class for authenticators.
Each authenticator is instantiated for authentication over a particular connection.
Instance Attribute Summary collapse
-
#connection ⇒ Mongo::Connection
readonly
private
The connection to authenticate over.
-
#user ⇒ Mongo::Auth::User
readonly
private
The user to authenticate.
Instance Method Summary collapse
- #conversation ⇒ Object private
-
#initialize(user, connection, **opts) ⇒ Base
constructor
private
Initializes the authenticator.
Constructor Details
#initialize(user, connection, **opts) ⇒ Base
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.
Initializes the authenticator.
37 38 39 40 |
# File 'lib/mongo/auth/base.rb', line 37 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.
30 31 32 |
# File 'lib/mongo/auth/base.rb', line 30 def connection @connection end |
#user ⇒ Mongo::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 The user to authenticate.
27 28 29 |
# File 'lib/mongo/auth/base.rb', line 27 def user @user end |
Instance Method Details
#conversation ⇒ Object
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.
42 43 44 |
# File 'lib/mongo/auth/base.rb', line 42 def conversation @conversation ||= self.class.const_get(:Conversation).new(user, connection) end |