lib/rmobio/auth.rb in rmobio-1.1.18 vs lib/rmobio/auth.rb in rmobio-1.1.19

- old
+ new

@@ -17,10 +17,11 @@ =begin Some summary should go here =end require 'rmobio/utils' +require 'cgi' module Rmobio module Auth def get_msisdn() @@ -94,11 +95,11 @@ #req_url=request.request_uri #token_list = [] #tokenize(req_url) do |token| # token_list << token #end - context = request.env['HTTP_MOBIO_CONTEXT'] + '/' + context = request.env['HTTP_MOBIO_CONTEXT'] if context surl=context + request.request_uri else surl = request.request_uri end @@ -145,10 +146,10 @@ if(attr==label_domain) logger.debug('find good finally') return end end - auth_app_url=MOBIO_CONFIG['authorization_app_url'] + '?label=' + label + '&domain=' + domain + '&burl=' + burl + '&surl=' + surl + auth_app_url=MOBIO_CONFIG['authorization_app_url'] + '?label=' + label + '&domain=' + domain + '&burl=' + burl + '&surl=' + CGI.escape(surl) redirect_to("#{auth_app_url}") end end #end Auth \ No newline at end of file