lib/els_token.rb in els_token-1.2.1 vs lib/els_token.rb in els_token-1.2.3
- old
+ new
@@ -69,11 +69,10 @@
@els_options
end
# authenticates against ELS and returns the user token
def authenticate(username,password,options={})
-
begin
response = els_http_request("/authenticate",
"uri=realm=aolcorporate&username=#{username}&password=#{password}",
options)
if response.code.eql? "200"
@@ -127,11 +126,10 @@
# identity. This is pretty much a convenience
# method that chains is_cookie_token_valid?
# then get_token_identity
def get_identity(token, options ={})
options = els_options.dup.merge(options)
- Rails.logger.debug(options)
return fake_id(options) if options.has_key?('faker')
begin
if is_token_valid?(token, options)
get_token_identity(token, options)
else
@@ -175,10 +173,9 @@
els_options.has_key? 'faker'
end
def fake_id(options ={})
options = els_options.dup.merge(options)
- Rails.logger.debug("getting fake id")
id = ElsIdentity.new
id.instance_variable_set("@roles",options['faker']['roles'])
id.instance_variable_set("@mail",options['faker']['mail'])
id.instance_variable_set("@last_name",options['faker']['last_name'])
id.instance_variable_set("@first_name",options['faker']['first_name'])