MCPcopy Index your code
hub / github.com/mongodb/mongo-python-driver / AwsSaslContext

Class AwsSaslContext

pymongo/asynchronous/auth_aws.py:52–64  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50 raise ConfigurationError("MONGODB-AWS authentication requires MongoDB version 4.4 or later")
51
52 class AwsSaslContext(pymongo_auth_aws.AwsSaslContext): # type: ignore
53 # Dependency injection:
54 def binary_type(self) -> Type[Binary]:
55 """Return the bson.binary.Binary type."""
56 return Binary
57
58 def bson_encode(self, doc: Mapping[str, Any]) -> bytes:
59 """Encode a dictionary to BSON."""
60 return bson.encode(doc)
61
62 def bson_decode(self, data: _ReadableBuffer) -> Mapping[str, Any]:
63 """Decode BSON to a dictionary."""
64 return bson.decode(data)
65
66 try:
67 ctx = AwsSaslContext(

Callers 1

_authenticate_awsFunction · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected