feature/Add props hydra_token_endpoint_auth_method

This commit is contained in:
Marko Milić 2022-05-25 11:30:08 +02:00
parent 42ca45a2d4
commit 3b1533aab3
2 changed files with 6 additions and 2 deletions

View File

@ -987,6 +987,8 @@ outboundAdapterCallContext.generalContext
##oauth2.jwk_set.url=http://localhost:4444/.well-known/jwks.json,https://www.googleapis.com/oauth2/v3/certs
## whether create hydra client when create consumer, default is false
#mirror_consumer_in_hydra=true
# There are 2 ways of authenticating OAuth 2.0 Clients at the /oauth2/token we support: private_key_jwt and client_secret_post
# hydra_token_endpoint_auth_method=private_key_jwt
# ------------------------------ Hydra oauth2 props end ------------------------------
# ------------------------------ default entitlements ------------------------------

View File

@ -135,8 +135,10 @@ class ConsumerRegistration extends MdcLoggable {
if(HydraUtil.integrateWithHydra) {
HydraUtil.createHydraClient(consumer, oAuth2Client => {
val signingAlg = signingAlgVar.is
oAuth2Client.setTokenEndpointAuthMethod("private_key_jwt")
val hydraTokenEndpointAuthMethod =
APIUtil.getPropsValue("hydra_token_endpoint_auth_method", "private_key_jwt")
oAuth2Client.setTokenEndpointAuthMethod(hydraTokenEndpointAuthMethod)
oAuth2Client.setTokenEndpointAuthSigningAlg(signingAlg)
oAuth2Client.setRequestObjectSigningAlg(signingAlg)