summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristoph Helma <helma@in-silico.ch>2013-04-03 12:07:14 +0200
committerChristoph Helma <helma@in-silico.ch>2013-04-03 12:07:14 +0200
commit4986315f6b68829e2aa04ebc3470b32f4fcebc40 (patch)
tree493d2b2c73959958bde66593ad6fb059f994e41a
parentea2514ce2a6c220491da575037c60034fd46103c (diff)
parentcf146574d83d72a66183f7d103ca1aa250d6e360 (diff)
Merge branch 'development' of github.com:opentox/opentox-client into development
-rw-r--r--lib/authorization.rb6
1 files changed, 0 insertions, 6 deletions
diff --git a/lib/authorization.rb b/lib/authorization.rb
index 8eefc63..361e259 100644
--- a/lib/authorization.rb
+++ b/lib/authorization.rb
@@ -88,12 +88,8 @@ module OpenTox
# @return [Boolean, nil] returns true, false or nil (if authorization-request fails).
def self.authorize(uri, action, subjectid)
return true if !AA
- #begin
return true if RestClientWrapper.post("#{AA}/auth/authorize",{:uri => uri, :action => action, :subjectid => subjectid})== "boolean=true\n"
return false
- #rescue
- # return nil
- #end
end
#Checks if a token is a valid token
@@ -323,10 +319,8 @@ module OpenTox
def self.authorized?(uri, request_method, subjectid)
request_method = request_method.to_sym if request_method
if $aa[:free_request].include?(request_method)
- #$logger.debug "authorized? >>true<< (request is free), method: #{request_method}, URI: #{uri}, subjectid: #{subjectid}"
true
elsif OpenTox::Authorization.free_uri?(uri, request_method)
- #$logger.debug "authorized? >>true<< (uris is free_uri), method: #{request_method}, URI: #{uri}, subjectid: #{subjectid}"
true
elsif $aa[:authenticate_request].include?(request_method)
ret = OpenTox::Authorization.is_token_valid(subjectid)