Skip to content

Commit

Permalink
Get client id from env var
Browse files Browse the repository at this point in the history
  • Loading branch information
spenes committed Dec 14, 2023
1 parent 039d62b commit 0bb7de4
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,11 @@ import com.nimbusds.jwt.JWTParser

class AzureAuthenticationCallbackHandler extends AuthenticateCallbackHandler {

val credentials: MSICredentials = new MSICredentials()
val credentials: MSICredentials = {
val clientId = sys.env.get("AZURE_CLIENT_ID_FOR_EVENT_HUB").orElse(sys.env.get("AZURE_CLIENT_ID"))
val creds = new MSICredentials()
clientId.map(creds.withClientId).getOrElse(creds)
}

var sbUri: String = ""

Expand Down

0 comments on commit 0bb7de4

Please sign in to comment.