Class: Mongo::Auth::Kerberos
- Includes:
- Executable
- Defined in:
- lib/mongo/auth/kerberos.rb,
lib/mongo/auth/kerberos/version.rb,
lib/mongo/auth/kerberos/conversation.rb,
lib/mongo/auth/kerberos/mri/authenticator.rb,
lib/mongo/auth/kerberos/jruby/authenticator.rb
Overview
Defines behaviour for Kerberos authentication.
Defined Under Namespace
Classes: Authenticator, Conversation
Constant Summary collapse
- MECHANISM =
The authentication mechinism string.
'GSSAPI'.freeze
- VERSION =
The gem version number.
'2.0.0'.freeze
Instance Method Summary collapse
-
#login(connection) ⇒ Protocol::Reply
Log the user in on the given connection.
Instance Method Details
#login(connection) ⇒ Protocol::Reply
Log the user in on the given connection.
43 44 45 46 47 48 49 50 |
# File 'lib/mongo/auth/kerberos.rb', line 43 def login(connection) conversation = Conversation.new(user, connection.address.host) reply = connection.dispatch([ conversation.start ]) until reply.documents[0][Conversation::DONE] reply = connection.dispatch([ conversation.finalize(reply) ]) end reply end |