You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+32Lines changed: 32 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -226,6 +226,38 @@ The OAuth2 token will be cached either per `trino.auth.OAuth2Authentication` ins
226
226
)
227
227
```
228
228
229
+
A custom caching implementation can be provided by creating a class implementing the `trino.auth.OAuth2TokenCache` abstract classand adding it asin`OAuth2Authentication(cache=my_custom_cache_impl)`. The custom caching implementation enables usage in multi-user environments (notebooks, web applications) in combination with a custom `redirect_auth_url_handler`as explained above.
230
+
231
+
```python
232
+
from typing import Optional
233
+
234
+
from trino.auth import OAuth2Authentication, OAuth2TokenCache
`CertificateAuthentication` class can be used to connect to Trino cluster configured with [certificate based authentication](https://trino.io/docs/current/security/certificate.html). `CertificateAuthentication` requires paths to a valid client certificate and private key.
0 commit comments