diff options
author | rautenberg <rautenberg@in-silico.ch> | 2012-03-08 09:54:40 +0100 |
---|---|---|
committer | rautenberg <rautenberg@in-silico.ch> | 2012-03-08 09:54:40 +0100 |
commit | f9e149b44f587e91a0bbf8a5d773b0490ff58de3 (patch) | |
tree | b159dd9934159827ca015f18c644aeda4846af50 | |
parent | 0573b2b029bdc62e9b59b2b3ec06dc3f35f372c4 (diff) |
repeat send policy to opensso if connection fails
-rw-r--r-- | lib/authorization.rb | 15 |
1 files changed, 8 insertions, 7 deletions
diff --git a/lib/authorization.rb b/lib/authorization.rb index d5d56e5..ef511fa 100644 --- a/lib/authorization.rb +++ b/lib/authorization.rb @@ -37,13 +37,14 @@ module OpenTox #Loads and sends Policyfile(XML) to open-sso server # @param [String] URI to create a policy for - def send(uri) + def send(uri) xml = get_xml(uri) ret = false - ret = Authorization.create_policy(xml, @subjectid) + ret = Authorization.create_policy(xml, @subjectid) + ret = Authorization.create_policy(xml, @subjectid) if !ret LOGGER.debug "Policy send with subjectid: #{@subjectid}" LOGGER.warn "Not created Policy is: #{xml}" if !ret - ret + ret end end @@ -360,7 +361,7 @@ module OpenTox false end end - + private def self.free_uri?(uri, request_method) if CONFIG[:authorization][:free_uris] @@ -374,7 +375,7 @@ module OpenTox end return false end - + def self.authorize_exception?(uri, request_method) if CONFIG[:authorization][:authorize_exceptions] CONFIG[:authorization][:authorize_exceptions].each do |request_methods,uris| @@ -387,6 +388,6 @@ module OpenTox end return false end - + end -end
\ No newline at end of file +end |