[docs]classClientCredentialsGrantClient:""" A client that implements `*Client Credentials Grant* <https://oauth.net/2/grant-types/client-credentials/>`_ (sometimes called Service Account Authentication). It is exposed via :data:`OpenidClient.client_credentials_grant <simple_openid_connect.client.OpenidClient.client_credentials_grant>` """
[docs]defauthenticate(self)->Union[TokenSuccessResponse,TokenErrorResponse]:""" Retrieve a token that is dedicated to the authenticated client from the provider. :returns: The result of the exchange """ifself._base_client.provider_config.token_endpointisNone:raiseUnsupportedByProviderError(f"The OpenID provider {self._base_client.provider_config.issuer} only seems to support the implicit flow and does not have a token endpoint")returnimpl.authenticate(token_endpoint=self._base_client.provider_config.token_endpoint,scope=self._base_client.scope,client_authentication=self._base_client.client_auth,)