Skip to content

Commit

Permalink
fix #2081
Browse files Browse the repository at this point in the history
  • Loading branch information
mathieuancelin committed Jan 28, 2025
1 parent 393264e commit ed531d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion otoroshi/app/next/plugins/clientcredentials.scala
Original file line number Diff line number Diff line change
Expand Up @@ -591,7 +591,7 @@ class NgClientCredentialTokenEndpoint extends NgBackendCall {
) => {
val possibleApiKey = env.datastores.apiKeyDataStore.findById(clientId)
possibleApiKey.flatMap {
case Some(apiKey) if apiKey.isValid(clientSecret) && apiKey.isActive() => {
case Some(apiKey) if apiKey.isValid(clientSecret) && apiKey.isActive() && apiKey.authorizedOnServiceOrGroups(ctx.route.id, ctx.route.groups) => {
val keyPairId = apiKey.metadata.getOrElse("jwt-sign-keypair", conf.defaultKeyPair)
val maybeKeyPair: Option[KeyPair] = env.proxyState.certificate(keyPairId).map(_.cryptoKeyPair)
val algo: Algorithm = maybeKeyPair.map { kp =>
Expand Down

0 comments on commit ed531d2

Please sign in to comment.