Module: Conjur::Rack
- Defined in:
- lib/conjur/rack/user.rb,
lib/conjur/rack/version.rb,
lib/conjur/rack/path_prefix.rb,
lib/conjur/rack/authenticator.rb
Defined Under Namespace
Classes: Authenticator, PathPrefix, User
Constant Summary
collapse
- VERSION =
"1.4.0"
Class Method Summary
collapse
Class Method Details
.identity ⇒ Object
13
14
15
|
# File 'lib/conjur/rack/authenticator.rb', line 13
def self.identity
Thread.current[:conjur_rack_identity] or raise "No Conjur identity for current request"
end
|
.identity? ⇒ Boolean
5
6
7
|
# File 'lib/conjur/rack/authenticator.rb', line 5
def self.identity?
!Thread.current[:conjur_rack_identity].nil?
end
|
.privilege ⇒ Object
17
18
19
|
# File 'lib/conjur/rack/authenticator.rb', line 17
def self.privilege
Thread.current[:conjur_rack_privilege]
end
|
.remote_ip ⇒ Object
21
22
23
|
# File 'lib/conjur/rack/authenticator.rb', line 21
def self.remote_ip
Thread.current[:conjur_rack_remote_ip]
end
|
.user ⇒ Object
9
10
11
|
# File 'lib/conjur/rack/authenticator.rb', line 9
def self.user
User.new(identity[0], identity[1], privilege, remote_ip)
end
|