Skip to main content

OAuth2 caller

cp:otoroshi.next.plugins.OAuth2Caller

This plugin can be used to call api that are authenticated using OAuth2 client_credential/password flow. Do not forget to enable client retry to handle token generation on expire.

categories:

  • Authentication

default configuration:

{
"kind" : "client_credentials",
"url" : "https://127.0.0.1:8080/oauth/token",
"method" : "POST",
"headerName" : "Authorization",
"headerValueFormat" : "Bearer %s",
"jsonPayload" : false,
"clientId" : "the client_id",
"clientSecret" : "the client_secret",
"scope" : null,
"audience" : null,
"user" : null,
"password" : null,
"cacheTokenSeconds" : 600000,
"tlsConfig" : {
"certs" : [ ],
"trustedCerts" : [ ],
"mtls" : false,
"loose" : false,
"trustAll" : false
}
}