From 2de472ba1c066aec3d4416b21a68b0b480e9aeb5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Martin=20G=C3=BCtlein?= Date: Tue, 28 May 2013 12:59:31 +0300 Subject: update comments --- lib/authorization.rb | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) (limited to 'lib') diff --git a/lib/authorization.rb b/lib/authorization.rb index 5a846c9..4d49b40 100644 --- a/lib/authorization.rb +++ b/lib/authorization.rb @@ -1,10 +1,10 @@ module OpenTox AA = $aa[:uri] if defined? $aa - AA ||= "https://opensso.in-silico.ch" #if not set in .opentox/conf/[application]/[test].rb + AA ||= "https://opensso.in-silico.ch" #if not set in .opentox/conf/[SERVICE].rb #Module for Authorization and Authentication #@example Authentication # require "opentox-client" - # OpenTox::Authorization::AA = "https://opensso.in-silico.ch" #if not set in .opentox/conf/[environment].yaml + # OpenTox::Authorization::AA = "https://opensso.in-silico.ch" #if not set in .opentox/conf/[SERVICE].rb # subjectid = OpenTox::Authorization.authenticate("username", "password") #@see http://www.opentox.org/dev/apis/api-1.2/AA OpenTox A&A API 1.2 specification @@ -337,10 +337,11 @@ module OpenTox end private + # @return [Boolean] checks if uri-method pair is included in :free_uri def self.free_uri?(uri, request_method) if $aa[:free_uris] $aa[:free_uris].each do |request_methods,uris| - if request_methods and uris and request_methods.include?(request_method.to_s) + if request_methods and uris and request_methods.include?(request_method.to_sym) uris.each do |u| return true if u.match uri end @@ -350,6 +351,7 @@ module OpenTox return false end + # @return [Boolean] checks if uri-method pair is included in :authorize_exceptions def self.authorize_exception?(uri, request_method) if $aa[:authorize_exceptions] $aa[:authorize_exceptions].each do |request_methods,uris| -- cgit v1.2.3