Class: Mongo::Auth::X509 Private
- Defined in:
- lib/mongo/auth/x509.rb,
lib/mongo/auth/x509/conversation.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 behavior for X.509 authentication.
Defined Under Namespace
Classes: Conversation
Constant Summary collapse
- MECHANISM =
This constant is part of a private API. You should avoid using this constant if possible, as it may be removed or be changed in the future.
The authentication mechanism string.
'MONGODB-X509'.freeze
Instance Attribute Summary
Attributes inherited from Base
Instance Method Summary collapse
-
#initialize(user, connection, **opts) ⇒ X509
constructor
private
Initializes the X.509 authenticator.
-
#login ⇒ BSON::Document
private
Log the user in on the current connection.
Methods inherited from Base
Constructor Details
#initialize(user, connection, **opts) ⇒ X509
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 X.509 authenticator.
36 37 38 39 40 41 42 43 44 45 46 47 48 |
# File 'lib/mongo/auth/x509.rb', line 36 def initialize(user, connection, **opts) # The only valid database for X.509 authentication is $external. if user.auth_source != '$external' user_name_msg = if user.name " #{user.name}" else '' end raise Auth::InvalidConfiguration, "User#{user_name_msg} specifies auth source '#{user.auth_source}', but the only valid auth source for X.509 is '$external'" end super end |
Instance Method Details
#login ⇒ BSON::Document
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.
Log the user in on the current connection.
53 54 55 |
# File 'lib/mongo/auth/x509.rb', line 53 def login converse_1_step(connection, conversation) end |