RubyApp 0.6.62 → 0.6.63

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -10,6 +10,8 @@ default:
10
10
  mobile:
11
11
  documents:
12
12
  authentication:
13
+ authentication_document:
14
+ return_to: HTTP_REFERER
13
15
  facebook:
14
16
  authentication_document:
15
17
  access_key: 'ABC'
@@ -17,10 +19,10 @@ default:
17
19
  o_auth:
18
20
  git_hub_authentication_document:
19
21
  access_key: 'ABC'
22
+ access_token_url: 'https://github.com/login/oauth/access_token'
23
+ authorize_url: 'https://github.com/login/oauth/authorize'
20
24
  secret_key: '123'
21
25
  url: 'https://api.github.com'
22
- authorize_url: 'https://github.com/login/oauth/authorize'
23
- access_token_url: 'https://github.com/login/oauth/access_token'
24
26
  open_id:
25
27
  ax_authentication_document:
26
28
  attributes:
@@ -29,7 +29,7 @@ module RubyApp
29
29
  RubyApp::Log.debug("FACEBOOK permissions=#{permissions.inspect}")
30
30
  @authentication = ::Koala::Facebook::OAuth.new(ENV['FACEBOOK_ACCESS_KEY'] || RubyApp::Elements::Mobile::Documents::Authentication::Facebook::AuthenticationDocument.configuration.access_key,
31
31
  ENV['FACEBOOK_SECRET_KEY'] || RubyApp::Elements::Mobile::Documents::Authentication::Facebook::AuthenticationDocument.configuration.secret_key,
32
- RubyApp::Request.url)
32
+ RubyApp::Request.environment[RubyApp::Elements::Mobile::Documents::Authentication::AuthenticationDocument.configuration.return_to])
33
33
  url = @authentication.url_for_oauth_code(:display => 'touch',
34
34
  :permissions => permissions.is_a?(Array) ? permissions.join(',') : permissions)
35
35
  RubyApp::Log.debug("FACEBOOK --> #{url.inspect}")
@@ -29,7 +29,7 @@ module RubyApp
29
29
  # RubyApp::Log.debug("OAUTH scopes=#{scopes.inspect}")
30
30
  # RubyApp::Log.debug("OAUTH options=#{options.inspect}")
31
31
  @client = ::OAuth2::Client.new(access_key, secret_key, options)
32
- url = @client.auth_code.authorize_url(:redirect_uri => RubyApp::Request.url,
32
+ url = @client.auth_code.authorize_url(:redirect_uri => RubyApp::Request.environment[RubyApp::Elements::Mobile::Documents::Authentication::AuthenticationDocument.configuration.return_to],
33
33
  :scope => scopes.is_a?(Array) ? scopes.join(',') : scopes)
34
34
  RubyApp::Log.debug("OAUTH --> #{url.inspect}")
35
35
  event.go(url)
@@ -29,7 +29,7 @@ module RubyApp
29
29
  @consumer = ::OpenID::Consumer.new(RubyApp::Session.data, nil)
30
30
  request = @consumer.begin(identifier)
31
31
  self.process_request(request)
32
- url = request.redirect_url(RubyApp::Request.url, RubyApp::Request.url)
32
+ url = request.redirect_url(RubyApp::Request.url, RubyApp::Request.environment[RubyApp::Elements::Mobile::Documents::Authentication::AuthenticationDocument.configuration.return_to])
33
33
  RubyApp::Log.debug("OPENID --> #{url.inspect}")
34
34
  event.go(url)
35
35
  else
@@ -17,7 +17,7 @@ module RubyApp
17
17
  #RubyApp::Log.debug("#{RubyApp::Log.prefix(self, __method__)} (now)=#{Time.now.inspect}")
18
18
  RubyApp::Response.set_cookie('_session', { :value => RubyApp::Session.session_id,
19
19
  :expires => RubyApp::Session.expires,
20
- :path => '/'})
20
+ :path => RubyApp.root})
21
21
  return @application.call(environment)
22
22
  ensure
23
23
  RubyApp::Session.unload!
@@ -10,6 +10,8 @@ default:
10
10
  mobile:
11
11
  documents:
12
12
  authentication:
13
+ authentication_document:
14
+ return_to: HTTP_REFERER
13
15
  facebook:
14
16
  authentication_document:
15
17
  access_key: 'ABC'
@@ -1,5 +1,5 @@
1
1
  module RubyApp
2
- VERSION = "0.6.62"
2
+ VERSION = "0.6.63"
3
3
  ROOT = File.expand_path(File.dirname(__FILE__))
4
4
 
5
5
  def self.root
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: RubyApp
3
3
  version: !ruby/object:Gem::Version
4
- hash: 123
4
+ hash: 121
5
5
  prerelease:
6
6
  segments:
7
7
  - 0
8
8
  - 6
9
- - 62
10
- version: 0.6.62
9
+ - 63
10
+ version: 0.6.63
11
11
  platform: ruby
12
12
  authors:
13
13
  - Frank G. Ficnar
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2013-02-15 00:00:00 Z
18
+ date: 2013-02-17 00:00:00 Z
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency
21
21
  version_requirements: &id001 !ruby/object:Gem::Requirement