Skip to content

Commit 2596094

Browse files
committed
Use new OIDC environment variables
1 parent a01d441 commit 2596094

File tree

4 files changed

+7
-7
lines changed

4 files changed

+7
-7
lines changed

app/controllers/application_controller.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,8 +50,8 @@ def force_authenticate_and_redirect_back
5050
if current_user
5151
refresh_token = session["ll_oidc_refresh_token"]
5252
if refresh_token && !@reauthenticated
53-
client = OAuth2::Client.new(ENV["LL_OIDC_CLIENT_ID"], ENV["LL_OIDC_CLIENT_SECRET"],
54-
site: ENV["LL_OIDC_HOST"],
53+
client = OAuth2::Client.new(ENV["LAYERS_OIDC_CLIENT_ID"], ENV["LAYERS_OIDC_CLIENT_SECRET"],
54+
site: ENV["LAYERS_API_URI"],
5555
token_url: "/o/oauth2/token")
5656
token = client.get_token({
5757
client_id: client.id,

config/initializers/bearer_authentication.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -37,8 +37,8 @@ def try_log_in(token)
3737
end
3838

3939
def authenticate!
40-
client = OAuth2::Client.new(ENV["LL_OIDC_CLIENT_ID"], ENV["LL_OIDC_CLIENT_SECRET"],
41-
site: ENV["LL_OIDC_HOST"],
40+
client = OAuth2::Client.new(ENV["LAYERS_OIDC_CLIENT_ID"], ENV["LAYERS_OIDC_CLIENT_SECRET"],
41+
site: ENV["LAYERS_API_URI"],
4242
token_url: "/o/oauth2/token")
4343

4444
token = OAuth2::AccessToken.new(client, bearer,

config/initializers/devise.rb

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -240,8 +240,8 @@
240240
# up on your models and hooks.
241241
# config.omniauth :github, 'APP_ID', 'APP_SECRET', scope: 'user,public_repo'
242242
if Rails.env.production?
243-
config.omniauth :learning_layers_oidc, ENV['LL_OIDC_CLIENT_ID'],
244-
ENV['LL_OIDC_CLIENT_SECRET'], scope: 'openid,email,profile,offline_access'
243+
config.omniauth :learning_layers_oidc, ENV['LAYERS_OIDC_CLIENT_ID'],
244+
ENV['LAYERS_OIDC_CLIENT_SECRET'], scope: 'openid,email,profile,offline_access'
245245
else
246246
config.omniauth :developer
247247
end

config/initializers/learning_layers_oidc_omniauth.rb

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ module Strategies
55
class LearningLayersOidc < OmniAuth::Strategies::OAuth2
66
option :name, "learning_layers_oidc"
77
option :client_options,
8-
site: ENV["LL_OIDC_HOST"],
8+
site: ENV["LAYERS_API_URI"],
99
authorize_url: "/o/oauth2/authorize",
1010
token_url: "/o/oauth2/token"
1111

0 commit comments

Comments
 (0)