Sha256: de536f957b93c17ea36082dee5d25eed9b8ce662cdaeb01e482633e6dc88e399
Contents?: true
Size: 1.34 KB
Versions: 5
Compression:
Stored size: 1.34 KB
Contents
# Copyright (C) 2014-2015 MongoDB Inc. # # Licensed under the Apache License, Version 2.0 (the "License"); # you may not use this file except in compliance with the License. # You may obtain a copy of the License at # # http://www.apache.org/licenses/LICENSE-2.0 # # Unless required by applicable law or agreed to in writing, software # distributed under the License is distributed on an "AS IS" BASIS, # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. # See the License for the specific language governing permissions and # limitations under the License. require 'mongo/auth/cr/conversation' module Mongo module Auth # Defines behaviour for MongoDB-CR authentication. # # @since 2.0.0 class CR include Executable # Log the user in on the given connection. # # @example Log the user in. # user.login(connection) # # @param [ Mongo::Connection ] connection The connection to log into. # # @return [ Protocol::Reply ] The authentication response. # # @since 2.0.0 def login(connection) conversation = Conversation.new(user, auth_database(connection)) reply = connection.dispatch([ conversation.start ]) reply = connection.dispatch([ conversation.continue(reply) ]) conversation.finalize(reply) end end end end
Version data entries
5 entries across 5 versions & 1 rubygems
Version | Path |
---|---|
mongo-2.0.2 | lib/mongo/auth/cr.rb |
mongo-2.0.1 | lib/mongo/auth/cr.rb |
mongo-2.0.0 | lib/mongo/auth/cr.rb |
mongo-2.0.0.rc | lib/mongo/auth/cr.rb |
mongo-2.0.0.beta | lib/mongo/auth/cr.rb |