MCPcopy Index your code
hub / github.com/couchbase/couchbase-python-client / __init__

Method __init__

couchbase/auth.py:147–169  ·  view source on GitHub ↗

CertificateAuthenticator instance.

(self,
                 cert_path=None,            # type: str
                 key_path=None,             # type: str
                 trust_store_path=None     # type: Optional[str]
                 )

Source from the content-addressed store, hash-verified

145 """
146
147 def __init__(self,
148 cert_path=None, # type: str
149 key_path=None, # type: str
150 trust_store_path=None # type: Optional[str]
151 ):
152 """CertificateAuthenticator instance."""
153 if not isinstance(cert_path, str):
154 msg = 'The cert_path must be a str representing the path to the client certificate.'
155 raise InvalidArgumentException(msg)
156
157 if not isinstance(key_path, str):
158 msg = 'The key_path must be a str representing the path to the client key.'
159 raise InvalidArgumentException(msg)
160
161 if trust_store_path is not None and not isinstance(trust_store_path, str):
162 msg = 'The trust_store_path must be a str representing the path to the certificate trust store.'
163 raise InvalidArgumentException(msg)
164
165 self._trust_store_path = trust_store_path
166 self._cert_path = cert_path
167 self._key_path = key_path
168
169 super().__init__(**self.as_dict())
170
171 def valid_keys(self):
172 return ['cert_path', 'key_path', 'trust_store_path']

Callers

nothing calls this directly

Calls 3

as_dictMethod · 0.95
__init__Method · 0.45

Tested by

no test coverage detected