Skip to content

Commit

Permalink
Merge pull request #176 from RADAR-base/update-oauthclient
Browse files Browse the repository at this point in the history
Update client credentials oauth client provider
  • Loading branch information
yatharthranjan authored Nov 29, 2024
2 parents 63f9314 + f237a9a commit cc02f32
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ data class ClientCredentialsConfig(
val tokenUrl: String,
val clientId: String? = null,
val clientSecret: String? = null,
val scope: String? = null,
val audience: String? = null,
) {
/**
* Fill in the client ID and client secret from environment variables. The variables are
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ fun Auth.clientCredentials(
append("grant_type", "client_credentials")
append("client_id", authConfig.clientId)
append("client_secret", authConfig.clientSecret)
authConfig.scope?.let { append("scope", it) }
authConfig.audience?.let { append("audience", it) }
},
) {
accept(ContentType.Application.Json)
Expand Down

0 comments on commit cc02f32

Please sign in to comment.