Skip to content

Commit

Permalink
Fix typo on env var OIDC_RENEW_ACCESS_TOKEN_ON_EXPIRY (#17)
Browse files Browse the repository at this point in the history
  • Loading branch information
gregnr authored Jul 20, 2020
1 parent 74d758d commit 3dd3ed8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 2 deletions.
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ environment variables is used in this image:
* `OID_CLIENT_ID`: OpenID Client ID
* `OID_CLIENT_SECRET`: OpenID Client Secret
* `OIDC_AUTH_METHOD`: OpenID Connect authentication method (`client_secret_basic` or `client_secret_post`)
* `OIDC_RENEW_ACCESS_TOKEN_ON_EXPIERY`: Enable silent renew of access token (`true` or `false`)
* `OIDC_RENEW_ACCESS_TOKEN_ON_EXPIRY`: Enable silent renew of access token (`true` or `false`)

* `PROXY_HOST`: Host name of the service to proxy
* `PROXY_PORT`: Port of the service to proxy
Expand Down
2 changes: 2 additions & 0 deletions nginx/conf/nginx.conf
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@ env OID_CLIENT_SECRET;
env OID_REDIRECT_PATH;
env OIDC_AUTH_SCOPE;
env OIDC_AUTH_METHOD;
env OIDC_RENEW_ACCESS_TOKEN_ON_EXPIRY;
# Keeping typo 'OIDC_RENEW_ACCESS_TOKEN_ON_EXPIERY' for backwards compatibility
env OIDC_RENEW_ACCESS_TOKEN_ON_EXPIERY;
env PROXY_HOST;
env PROXY_PORT;
Expand Down
3 changes: 2 additions & 1 deletion nginx/lua/auth.lua
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@ local opts = {
client_id = os.getenv("OID_CLIENT_ID"),
client_secret = os.getenv("OID_CLIENT_SECRET"),
token_endpoint_auth_method = os.getenv("OIDC_AUTH_METHOD") or "client_secret_basic",
renew_access_token_on_expiry = os.getenv("OIDC_RENEW_ACCESS_TOKEN_ON_EXPIERY") ~= "false",
-- Backwards compatible with typo 'OIDC_RENEW_ACCESS_TOKEN_ON_EXPIERY'
renew_access_token_on_expiry = os.getenv("OIDC_RENEW_ACCESS_TOKEN_ON_EXPIRY") ~= "false" and os.getenv("OIDC_RENEW_ACCESS_TOKEN_ON_EXPIERY") ~= "false",
scope = os.getenv("OIDC_AUTH_SCOPE") or "openid",
iat_slack = 600,
}
Expand Down

0 comments on commit 3dd3ed8

Please sign in to comment.