CertificateAuthenticator instance.
(self,
cert_path=None, # type: str
key_path=None, # type: str
trust_store_path=None # type: Optional[str]
)
| 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'] |
nothing calls this directly
no test coverage detected