stormpath-rails 0.3.1 → 0.3.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,6 +1,7 @@
1
1
  require "stormpath-sdk"
2
2
  include Stormpath::Client
3
3
  include Stormpath::Resource
4
+ include Stormpath::Authentication
4
5
 
5
6
  module Stormpath
6
7
  module Rails
@@ -8,8 +9,8 @@ module Stormpath
8
9
  cattr_accessor :connection
9
10
 
10
11
  def self.authenticate_account(login, password)
11
- #TODO remove app href from config
12
- auth_result = self.application.authenticate_account ::UsernamePasswordRequest.new(login, password)
12
+ application = self.ds.get_resource Config[:application], ::Application
13
+ auth_result = application.authenticate_account ::UsernamePasswordRequest.new(login, password)
13
14
  auth_result.get_account
14
15
  end
15
16
 
@@ -45,11 +46,6 @@ module Stormpath
45
46
  self.connection ||= ::ClientApplicationBuilder.new.set_application_href(Config[:href]).build
46
47
  self.connection.client.data_store
47
48
  end
48
-
49
- def self.application
50
- self.connection ||= ::ClientApplicationBuilder.new.set_application_href(Config[:href]).build
51
- self.connection.application
52
- end
53
49
  end
54
50
  end
55
51
  end
@@ -1,5 +1,5 @@
1
1
  module Stormpath
2
2
  module Rails
3
- VERSION = "0.3.1"
3
+ VERSION = "0.3.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: stormpath-rails
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.3.1
4
+ version: 0.3.2
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: