Base — Documentation by YARD 0.9.37 (original) (raw)

Class: Mongo::Auth::BasePrivate

Inherits:

Object

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

Instance Method Summarycollapse

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.

40 41 42 43 # File 'lib/mongo/auth/base.rb', line 40 def initialize(user, connection, **opts) @user = user @connection = connection end

Instance Attribute Details

#connection ⇒ Mongo::Connection

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.

33 34 35 # File 'lib/mongo/auth/base.rb', line 33 def connection @connection end

#userMongo::Auth::User

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.

30 31 32 # File 'lib/mongo/auth/base.rb', line 30 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.

| 45 46 47 | # File 'lib/mongo/auth/base.rb', line 45 def conversation @conversation ||= self.class.const_get(:Conversation).new(user, connection) end | | -------- | ---------------------------------------------------------------------------------------------------------------------------------------------- |