Skip to content

Commit

Permalink
[update]add login and password when using proxy
Browse files Browse the repository at this point in the history
  • Loading branch information
Pierre Therrode authored and vsct-jburet committed Jul 24, 2023
1 parent 970c4e0 commit 3eaced7
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion shared/src/main/kotlin/security/auth/GithubOAuthProvider.kt
Original file line number Diff line number Diff line change
Expand Up @@ -51,13 +51,19 @@ internal class GithubOAuthProvider(
HttpClientOptions().apply {
val proxyHost = propertyOrNull("tock_oauth2_proxy_host")
val proxyPort = intProperty("tock_oauth2_proxy_port", 0)
val proxyUsername= propertyOrNull("tock_oauth2_proxy_username")
val proxyPassword = propertyOrNull("tock_oauth2_proxy_password")
if (proxyHost != null) {
logger.info { "set proxy $proxyHost:$proxyPort" }
proxyOptions = ProxyOptions().apply {
host = proxyHost
port = proxyPort
if (proxyUsername != null && proxyPassword != null) {
username = proxyUsername
password = proxyPassword
}
}
}
}
}
)
) : SSOTockAuthProvider(vertx), OAuth2Auth by oauth2 {
Expand Down

0 comments on commit 3eaced7

Please sign in to comment.