Package com.codename1.backend.security.oauth2.client.credentials
package com.codename1.backend.security.oauth2.client.credentials
Access tokens this server obtains to call other services: the OAuth2 client credentials grant, the JWT bearer grant of RFC 7523, and Google service accounts, without a provider SDK.
A grant (ClientCredentialsGrant,
JwtBearerGrant) performs
one exchange; an
AccessTokenProvider
caches its token, refreshes it ahead of expiry, shares a refresh among
concurrent callers and backs off after a failure.
-
ClassDescriptionAn access token this server obtained to call another one.One way of obtaining an access token: a grant against a token endpoint.An access token for calling another service, kept fresh.Builds an
AccessTokenProviderfrom configuration, so the credential lives in a secret store or the environment instead of in code.The OAuth2 client credentials grant (RFC 6749 section 4.4): this server authenticates as itself and receives a token for its own account.How the client proves who it is.A Google service account, read from the JSON key file the Cloud console downloads, as aJwtBearerGrant.The JWT bearer grant of RFC 7523 section 2.1: this server signs an assertion with a service account's private key and exchanges it for an access token.A token endpoint did not issue a token.A token endpoint: where a grant posts its form, and how the answer is read.A token endpoint's answer.Sends one form-encoded POST.