This function transforms the client id and the client secret into a header that conforms with http basic auth.
It joins the id and the secret with a : then base64 encodes it, then adds the appropriate text. Secrets are
first URL encoded to escape illegal characters.
defget_token(
token_endpoint: str,
scopes: typing.Optional[typing.List[str]],
authorization_header: typing.Optional[str],
client_id: typing.Optional[str],
device_code: typing.Optional[str],
audience: typing.Optional[str],
grant_type: <enum 'GrantType'>,
http_proxy_url: typing.Optional[str],
verify: typing.Union[bool, str, NoneType],
session: typing.Optional[requests.sessions.Session],
refresh_token: typing.Optional[str],
) -> e: (Text,Text,Int) The first element is the access token retrieved from the IDP, the second is the refresh token
:rtype: (Text,Text,Int) The first element is the access token retrieved from the IDP, the second is the refresh token
retrieved from the IDP, the third is the expiration in seconds