Class AccessTokenProviders
java.lang.Object
com.codename1.backend.security.oauth2.client.credentials.AccessTokenProviders
Builds an AccessTokenProvider from configuration, so the credential lives in
a secret store or the environment instead of in code.
Every key is under cn1.security.oauth2.client.credentials.<name>.:
| key | meaning |
|---|---|
grant |
client_credentials, jwt_bearer or google_service_account |
token-uri |
the token endpoint (not used by google_service_account) |
client-id |
the client id (client_credentials) |
client-secret |
the secret, sent as HTTP Basic unless client-authentication says post |
client-authentication |
basic, post or private_key_jwt |
key-file |
PEM private key: private_key_jwt, or the jwt_bearer signing key |
key-id |
the kid the key is registered under |
issuer, subject, audience |
jwt_bearer claims; audience is also sent by client_credentials |
google-json |
path of a Google service-account key file |
scopes |
space- or comma-separated scopes |
scopes-in-assertion |
jwt_bearer: true sends the scopes as an assertion claim instead of a form parameter (false) |
refresh-skew |
seconds before expiry a token stops being used (60) |
max-backoff |
longest pause between failed exchanges, in seconds (60) |
@Bean
AccessTokenProvider billing(Config config) throws IOException {
return AccessTokenProviders.fromConfig(config, "billing");
}
-
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic AccessTokenProviderfromConfig(Config config, String name)
-
Field Details
-
PREFIX
-
-
Method Details
-
fromConfig
- Throws:
IOException- when a file cannot be read or the configuration is incomplete; the message names the missing key, never a value
-