diff options
author | rautenberg <rautenberg@in-silico.ch> | 2013-07-26 16:43:03 +0200 |
---|---|---|
committer | rautenberg <rautenberg@in-silico.ch> | 2013-07-26 16:43:03 +0200 |
commit | 4b2acd3e1ded3819e6aea616180459c38ce3b4d3 (patch) | |
tree | dfafce25b619e77d93f55198af9b983872b16a7d /lib/authorization-helper.rb | |
parent | 3e44b26115664c030f66e874b2ac2cc5453dcb82 (diff) |
adapt libs for new A&A
Diffstat (limited to 'lib/authorization-helper.rb')
-rw-r--r-- | lib/authorization-helper.rb | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/authorization-helper.rb b/lib/authorization-helper.rb index a32f9b7..625c99f 100644 --- a/lib/authorization-helper.rb +++ b/lib/authorization-helper.rb @@ -10,7 +10,8 @@ module OpenTox # @return [String] subjectid from session or nil def login(username, password) logout - session[:subjectid] = OpenTox::Authorization.authenticate(username, password) + OpenTox::Authorization.authenticate(username, password) + session[:subjectid] = OpenTox::RestClientWrapper.subjectid $logger.debug "ToxCreate login user #{username} with subjectid: " + session[:subjectid].to_s if session[:subjectid] != nil session[:username] = username @@ -69,7 +70,7 @@ module OpenTox request_method = request.env['REQUEST_METHOD'] uri = clean_uri("#{request.env['rack.url_scheme']}://#{request.env['HTTP_HOST']}#{request.env['REQUEST_URI']}") #.sub("http://","https://") request_method = "GET" if request_method == "POST" && uri =~ /\/model\/\d+\/?$/ - return OpenTox::Authorization.authorized?(uri, request_method, subjectid) + return OpenTox::Authorization.authorized?(uri, request_method) end # Cleans URI from querystring and file-extension. Sets port 80 to emptystring |