Skip to content

Commit

Permalink
Fixed Static Configuration Loading (#63)
Browse files Browse the repository at this point in the history
  • Loading branch information
bellebaum authored Jun 27, 2022
1 parent b58139b commit c767a7a
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 10 deletions.
14 changes: 7 additions & 7 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -9,30 +9,30 @@ GEM
haml (5.2.2)
temple (>= 0.8.0)
tilt
jwt (2.3.0)
jwt (2.4.1)
multi_json (1.15.0)
mustermann (1.1.1)
ruby2_keywords (~> 0.0.1)
net-ldap (0.17.0)
net-ldap (0.17.1)
openssl (3.0.0)
parallel (1.22.1)
parser (3.1.2.0)
ast (~> 2.4.1)
pg (1.3.5)
pg (1.4.1)
power_assert (2.0.1)
rack (2.2.3.1)
rack-protection (2.2.0)
rack
rack-test (1.1.0)
rack (>= 1.0, < 3)
rack-test (2.0.0)
rack (>= 1.3)
rainbow (3.1.1)
regexp_parser (2.5.0)
rexml (3.2.5)
rqrcode (2.1.1)
chunky_png (~> 1.0)
rqrcode_core (~> 1.0)
rqrcode_core (1.2.0)
rubocop (1.30.0)
rubocop (1.31.0)
parallel (~> 1.10)
parser (>= 3.1.0.0)
rainbow (>= 2.2.2, < 4.0)
Expand Down Expand Up @@ -64,7 +64,7 @@ GEM
eventmachine (~> 1.0, >= 1.0.4)
rack (>= 1, < 3)
tilt (2.0.10)
unicode-display_width (2.1.0)
unicode-display_width (2.2.0)

PLATFORMS
x86_64-linux
Expand Down
4 changes: 2 additions & 2 deletions lib/keys.rb
Original file line number Diff line number Diff line change
Expand Up @@ -68,15 +68,15 @@ def self.store_key(bind)

# Certificates
if key_material['certs'].nil?
File.delete "#{filename}.cert" if File.exist? "#{filename}.cert"
FileUtils.rm_rf "#{filename}.cert"
else
pem = key_material['certs'].map(&:to_pem).join("\n")
File.write("#{filename}.cert", pem)
end

# Keys
if key_material['sk'].nil?
File.delete "#{filename}.key" if File.exist? "#{filename}.key"
FileUtils.rm_rf "#{filename}.key"
else
File.write("#{filename}.key", key_material['sk'])
end
Expand Down
2 changes: 1 addition & 1 deletion plugins/token_user_attributes/token_user_attributes.rb
Original file line number Diff line number Diff line change
Expand Up @@ -31,4 +31,4 @@ def map_to_token(bind, sink)
end
end

TokenUserAttributesPlugin.new Config.base_config.dig('plugins', 'token_user_attributes')
TokenUserAttributesPlugin.new PluginLoader.configuration('token_user_attributes')

0 comments on commit c767a7a

Please sign in to comment.