Skip to content

Commit

Permalink
Issue with mix n match managed/unmanaged?
Browse files Browse the repository at this point in the history
  • Loading branch information
jacob-meidell committed Aug 28, 2023
1 parent cfabe8d commit cd04d47
Showing 1 changed file with 7 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,12 +13,16 @@ import pensjon.opptjening.azure.ad.client.TokenProvider
@Profile("dev-gcp", "prod-gcp")
class BarnetrygdTokenProvider(
@Value("\${BARNETRYGD_API_ID}") val appId: String,
private val azureAdConfig: AzureAdTokenClientConfig,
azureAdConfig: AzureAdTokenClientConfig
) : TokenProvider {
private val config: AzureAdConfig = AzureAdVariableConfig(
azureAppClientId = azureAdConfig.azureAppClientId,
azureAppClientSecret = azureAdConfig.azureAppClientSecret,
targetApiId = appId,
wellKnownUrl = azureAdConfig.wellKnownUrl,
),
)
private val tokenProvider: TokenProvider = AzureAdTokenProvider(config)
) : TokenProvider by tokenProvider
override fun getToken(): String {
return tokenProvider.getToken()
}
}

0 comments on commit cd04d47

Please sign in to comment.