code: def _authenticate_mongo_cr(credentials, sock_info):
      
      source = credentials.source
      username = credentials.username
      password = credentials.password
      # Get a nonce
      response = sock_info.command(source, {'getnonce': 1})
      nonce = response['nonce']
      key = _auth_key(nonce, username, password)
  
      # Actually authenticate
      query = SON([('authenticate', 1),
                   ('user', username),
                   ('nonce', nonce),
                   ('key', key)])
      sock_info.command(source, query)
docs: Authenticate using MONGODB-CR.