Method: Mongo::Auth::ScramConversationBase#continue
- Defined in:
- lib/mongo/auth/scram_conversation_base.rb
#continue(reply_document, connection) ⇒ Protocol::Message
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.
Continue the SCRAM conversation. This sends the client final message to the server after setting the reply from the previous server communication.
73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 |
# File 'lib/mongo/auth/scram_conversation_base.rb', line 73 def continue(reply_document, connection) @id = reply_document['conversationId'] payload_data = reply_document['payload'].data parsed_data = parse_payload(payload_data) @server_nonce = parsed_data.fetch('r') @salt = Base64.strict_decode64(parsed_data.fetch('s')) @iterations = parsed_data.fetch('i').to_i.tap do |i| if i < MIN_ITER_COUNT raise Error::InsufficientIterationCount.new( Error::InsufficientIterationCount.(MIN_ITER_COUNT, i)) end end @auth_message = "#{},#{payload_data},#{without_proof}" validate_server_nonce! selector = CLIENT_CONTINUE_MESSAGE.merge( payload: , conversationId: id, ) (connection, user.auth_source, selector) end |