@@ -359,8 +359,8 @@ def authenticate_oidc_authorization_code(
359
359
360
360
.. deprecated:: 0.19.0
361
361
Usage of the Authorization Code flow is deprecated (because of its complexity) and will be removed.
362
- It is recommended to use the Device Code flow with :py:meth:`authenticate_oidc_device`
363
- or Client Credentials flow with :py:meth:`authenticate_oidc_client_credentials`.
362
+ It is recommended to use the Device Code flow with :py:meth:`Connection. authenticate_oidc_device`
363
+ or Client Credentials flow with :py:meth:`Connection. authenticate_oidc_client_credentials`.
364
364
"""
365
365
provider_id , client_info = self ._get_oidc_provider_and_client_info (
366
366
provider_id = provider_id , client_id = client_id , client_secret = client_secret ,
@@ -612,8 +612,6 @@ def authenticate_oidc_access_token(self, access_token: str, provider_id: Optiona
612
612
:param access_token: OIDC access token
613
613
:param provider_id: id of the OIDC provider as listed by the openEO backend (``/credentials/oidc``).
614
614
If not specified, the first (default) OIDC provider will be used.
615
- :param skip_verification: Skip clients-side verification of the provider_id
616
- against the backend's list of providers to avoid and related OIDC configuration
617
615
618
616
.. versionadded:: 0.31.0
619
617
@@ -625,6 +623,23 @@ def authenticate_oidc_access_token(self, access_token: str, provider_id: Optiona
625
623
self ._oidc_auth_renewer = None
626
624
return self
627
625
626
+ def authenticate_bearer_token (self , bearer_token : str ) -> Connection :
627
+ """
628
+ Set up authorization headers directly with a bearer token.
629
+
630
+ .. warning::
631
+ This helper is for advanced usage only.
632
+ In general, it is recommended to use the more standard OIDC authentication methods
633
+ like :py:meth:`Connection.authenticate_oidc`.
634
+
635
+ :param bearer_token: openEO-style bearer token.
636
+
637
+ .. versionadded:: 0.38.0
638
+ """
639
+ self .auth = BearerAuth (bearer = bearer_token )
640
+ self ._oidc_auth_renewer = None
641
+ return self
642
+
628
643
def request (
629
644
self ,
630
645
method : str ,
0 commit comments