MCPcopy Create free account
hub / github.com/apache/cassandra-python-driver / CredentialsMessage

Class CredentialsMessage

cassandra/protocol.py:437–453  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

435
436
437class CredentialsMessage(_MessageType):
438 opcode = 0x04
439 name = 'CREDENTIALS'
440
441 def __init__(self, creds):
442 self.creds = creds
443
444 def send_body(self, f, protocol_version):
445 if protocol_version > 1:
446 raise UnsupportedOperation(
447 "Credentials-based authentication is not supported with "
448 "protocol version 2 or higher. Use the SASL authentication "
449 "mechanism instead.")
450 write_short(f, len(self.creds))
451 for credkey, credval in self.creds.items():
452 write_string(f, credkey)
453 write_string(f, credval)
454
455
456class AuthChallengeMessage(_MessageType):

Callers 1

Calls

no outgoing calls

Tested by

no test coverage detected