identity 1.0.1 → 1.0.2
Sign up to get free protection for your applications and to get access to all the features.
- data/identity.gemspec +1 -1
- data/lib/connection_handler.rb +0 -6
- data/lib/warden/strategy.rb +4 -15
- metadata +2 -2
data/identity.gemspec
CHANGED
data/lib/connection_handler.rb
CHANGED
data/lib/warden/strategy.rb
CHANGED
@@ -3,26 +3,15 @@ require 'warden'
|
|
3
3
|
module Warden
|
4
4
|
module Strategies
|
5
5
|
class IdentityStrategy < Warden::Strategies::Base
|
6
|
-
def initialize(env, scope)
|
7
|
-
super(env, scope)
|
8
|
-
Rails.logger.debug("initialize, #{self}")
|
9
|
-
config = Rails.configuration
|
10
|
-
handler = Identity::ConnectionHandler.new config.identity_key, config.identity_key_password, config.identity_certificate, config.identity_truststore
|
11
|
-
# create the provider
|
12
|
-
@provider = Identity::Provider::IdentityServiceProvider.new handler
|
13
|
-
end
|
14
|
-
|
15
6
|
def valid?
|
16
|
-
Rails.logger.debug("valid?, #{self}")
|
17
|
-
#Rails.logger.debug("session #{session.inspect}")
|
18
|
-
#Rails.logger.debug("params #{params.inspect}")
|
19
7
|
params["username"] || session[:identity_username_key]
|
20
8
|
end
|
21
9
|
|
22
10
|
def authenticate!
|
23
|
-
Rails.
|
24
|
-
|
25
|
-
#
|
11
|
+
config = Rails.configuration
|
12
|
+
handler = Identity::ConnectionHandler.new config.identity_key, config.identity_key_password, config.identity_certificate, config.identity_truststore
|
13
|
+
# create the provider
|
14
|
+
@provider = Identity::Provider::IdentityServiceProvider.new handler
|
26
15
|
|
27
16
|
if session[:identity_username_key].nil? && session[:identity_display_items].nil?
|
28
17
|
pretext = @provider.pre_authenticate params["username"], request.ip
|