• Home
  • Raw
  • Download

Lines Matching +full:x +full:- +full:access +full:- +full:token

7 #      http://www.apache.org/licenses/LICENSE-2.0
15 """OAuth 2.0 Token Exchange Spec.
17 This module defines a token exchange utility based on the `OAuth 2.0 Token
19 for GCP access tokens in workload identity pools to access Google APIs.
30 .. _OAuth 2.0 Token Exchange: https://tools.ietf.org/html/rfc8693
31 .. _rfc8693 section 2.2.1: https://tools.ietf.org/html/rfc8693#section-2.2.1
42 _URLENCODED_HEADERS = {"Content-Type": "application/x-www-form-urlencoded"}
46 """Implements the OAuth 2.0 token exchange spec based on
54 token_exchange_endpoint (str): The token exchange endpoint.
76 """Exchanges the provided token for another type of token based on the
82 grant_type (str): The OAuth 2.0 token exchange grant type.
83 subject_token (str): The OAuth 2.0 token exchange subject token.
84 subject_token_type (str): The OAuth 2.0 token exchange subject token type.
85 resource (Optional[str]): The optional OAuth 2.0 token exchange resource field.
86 audience (Optional[str]): The optional OAuth 2.0 token exchange audience field.
88 requested_token_type (Optional[str]): The optional OAuth 2.0 token exchange requested
89 token type.
90 actor_token (Optional[str]): The optional OAuth 2.0 token exchange actor token.
91 … actor_token_type (Optional[str]): The optional OAuth 2.0 token exchange actor token type.
93 non-standard Google specific options.
95 headers to pass to the token exchange endpoint.
98 Mapping[str, str]: The token exchange JSON-decoded response data containing
99 the requested token and its expiration time.
102 google.auth.exceptions.OAuthError: If the token endpoint returned
124 # Add additional non-standard options.
139 body=urllib.parse.urlencode(request_body).encode("utf-8"),
143 response.data.decode("utf-8")
148 # If non-200 response received, translate to OAuthError exception.