class Conjur::WebServer::ConjurInfo
Middleware that adds some conjur info to the rack environment
Constants
- PROPERTIES
Public Class Methods
new(app)
click to toggle source
# File lib/conjur/webserver/conjur_info.rb, line 5 def initialize app @app = app end
Public Instance Methods
account()
click to toggle source
# File lib/conjur/webserver/conjur_info.rb, line 24 def account Conjur.account end
call(env)
click to toggle source
# File lib/conjur/webserver/conjur_info.rb, line 9 def call env update_env env @app.call env end
roleid()
click to toggle source
# File lib/conjur/webserver/conjur_info.rb, line 20 def roleid "#{account}:user:#{Conjur::Authn.get_credentials[0]}" end
stack()
click to toggle source
# File lib/conjur/webserver/conjur_info.rb, line 28 def stack Conjur.stack end
update_env(env)
click to toggle source
# File lib/conjur/webserver/conjur_info.rb, line 14 def update_env env PROPERTIES.each{|name| env["conjur.#{name}"] = send(name)} end