diff options
author | mguetlein <martin.guetlein@gmail.com> | 2011-01-25 16:27:39 +0100 |
---|---|---|
committer | mguetlein <martin.guetlein@gmail.com> | 2011-01-25 16:27:39 +0100 |
commit | 2528891633d838a383f5a0e07712a0a8ee839f32 (patch) | |
tree | 6e221f6d0e18d280e8011c7dff16bc1e0581281a /lib/authorization.rb | |
parent | ddcf8597a13ea6f03c697c78d224376ff36c7ea3 (diff) | |
parent | dbd302164b74de2b241627bcc205de7245ea0da1 (diff) |
merged michas GET authorization
Diffstat (limited to 'lib/authorization.rb')
-rw-r--r-- | lib/authorization.rb | 13 |
1 files changed, 10 insertions, 3 deletions
diff --git a/lib/authorization.rb b/lib/authorization.rb index c33f712..5bc690a 100644 --- a/lib/authorization.rb +++ b/lib/authorization.rb @@ -114,7 +114,9 @@ module OpenTox begin resource = RestClient::Resource.new("#{AA_SERVER}/pol") out = resource.get(:subjectid => subjectid) - return out.split("\n") + return out.split("\n") + rescue RestClient::InternalServerError => e + raise e.response rescue return nil end @@ -313,9 +315,14 @@ module OpenTox false end end + true + end + + class << self + alias :token_valid? :is_token_valid end - - end + + end end |