This function uses a Bearer JWT as an authorization grant to get an access token, as defined by rfc7523, Section 2.1. It is often used for service accounts, accounts that are used primarily in automated environments.
Arguments
- client
An
oauth_client()
.- claim
A list of claims. If all elements of the claim set are static apart from
iat
,nbf
,exp
, orjti
, provide a list andjwt_claim()
will automatically fill in the dynamic components. If other components need to vary, you can instead provide a zero-argument callback function which should calljwt_claim()
.- signature
Function use to sign
claim
, e.g.jwt_encode_sig()
.- signature_params
Additional arguments passed to
signature
, e.g.size
,header
.- scope
Scopes to be requested from the resource owner.
- token_params
List containing additional parameters passed to the
token_url
.
Value
An oauth_token.
See also
Other OAuth flows:
oauth_flow_auth_code()
,
oauth_flow_client_credentials()
,
oauth_flow_device()
,
oauth_flow_password()
,
oauth_flow_refresh()