authrocket 1.1.0 → 1.2.0

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 53bfcb95248a74b37d0ac613c38c29a853798d40
4
- data.tar.gz: f087381b2969437dae746174e641ac0790426dd4
3
+ metadata.gz: 86bb498763a05b226efad50e30a2c6feb5e65fdc
4
+ data.tar.gz: 36e8b257613ab077c46fbcb1e49f0cb3892e6162
5
5
  SHA512:
6
- metadata.gz: 0de20f77e25e048700b360f53f80cb5591ee135dfde912f87d4f08e80700854357390da53894afc1ba1424ec268c2c25225ffe322a6ba5b8cf7bf4ef65d9e3b5
7
- data.tar.gz: 7bf84ae3a60d25094523e05ecbcdf8e9dc4c1c46045d24ce7189f97eb8f9291725046243d174b90ebb5bd40cc9793ee1b34cac54790705251dbe1329c64ed7ec
6
+ metadata.gz: 88c49fdef9a6178b0960b509627ebec2cf8ec1c4715db56ffdcbae64efa3915b89d42ea668a01a528039c4f8f6a14555b152fc5e5ffdf594d135c11744241a08
7
+ data.tar.gz: 1a054adbc2869b9f01ff4ff6fc450813a4a46f9006ff3915dc8586627c1126ed3a0b3fffba8f6a421ed67270816cf17ea4d45806dbde913418f0f76c236775b8
@@ -1,3 +1,10 @@
1
+ #### 1.2.0
2
+
3
+ - Add Credential resource
4
+ - Deprecate User#api_key - Replaced by Credential#api_key
5
+ - Add AuthProvider resource
6
+ - Deprecate LoginPolicy#enable_logins, #enable_signups, and #name_field - Replaced by AuthProvider#login, #signup, and #name_field where #provider_type is 'login_rocket'
7
+
1
8
  #### 1.1.0
2
9
 
3
10
  - Add custom attributes for Membership, Org, Realm, User
@@ -4,7 +4,7 @@ require 'ncore'
4
4
  require "authrocket/api/#{f}"
5
5
  end
6
6
 
7
- %w(app_hook event login_policy membership org realm user user_token).each do |f|
7
+ %w(app_hook auth_provider credential event login_policy membership org realm user user_token).each do |f|
8
8
  require "authrocket/#{f}"
9
9
  end
10
10
 
@@ -1,3 +1,3 @@
1
1
  module AuthRocket
2
- VERSION = '1.1.0'
2
+ VERSION = '1.2.0'
3
3
  end
@@ -0,0 +1,11 @@
1
+ module AuthRocket
2
+ class AuthProvider < Resource
3
+ crud :all, :find, :create, :update, :delete
4
+
5
+ belongs_to :realm
6
+
7
+ attr :provider_type
8
+ attr :login, :name_field, :signup
9
+
10
+ end
11
+ end
@@ -0,0 +1,11 @@
1
+ module AuthRocket
2
+ class Credential < Resource
3
+ crud :find, :create, :update, :delete
4
+
5
+ belongs_to :user
6
+
7
+ attr :api_key, :credential_type
8
+ attr :password, :password_confirmation
9
+
10
+ end
11
+ end
@@ -5,9 +5,10 @@ module AuthRocket
5
5
  belongs_to :realm
6
6
  has_many :events
7
7
 
8
- attr :custom_domains, :enable_logins, :enable_signups, :external_css
9
- attr :footer, :header, :login_handler, :name, :name_field, :primary_domain
8
+ attr :custom_domains, :external_css
9
+ attr :footer, :header, :login_handler, :name, :primary_domain
10
10
  attr :signup_handler, :subdomain
11
+ attr :enable_logins, :enable_signups, :name_field # deprecated
11
12
  attr :base_domain, :domains # readonly
12
13
 
13
14
  end
@@ -3,6 +3,7 @@ module AuthRocket
3
3
  crud :all, :find, :create, :update, :delete
4
4
 
5
5
  has_many :app_hooks
6
+ has_many :auth_providers
6
7
  has_many :events
7
8
  has_many :login_policies
8
9
  has_many :orgs
@@ -3,16 +3,23 @@ module AuthRocket
3
3
  crud :all, :find, :create, :update, :delete
4
4
 
5
5
  belongs_to :realm
6
+ has_many :credentials
6
7
  has_many :events
7
8
  has_many :memberships
8
9
 
9
- attr :api_key, :custom, :email, :first_name
10
+ attr :api_key # deprecated
11
+ attr :custom, :email, :first_name
10
12
  attr :last_name, :name, :password, :password_confirmation
11
13
  attr :reference, :state, :user_type, :username
12
14
  attr_datetime :created_at, :last_login_at
13
15
  attr_datetime :last_login_on # deprecated
14
16
 
15
17
 
18
+ def credentials
19
+ reload unless @attribs[:credentials]
20
+ @attribs[:credentials]
21
+ end
22
+
16
23
  def orgs
17
24
  memberships.map(&:org).compact
18
25
  end
metadata CHANGED
@@ -1,55 +1,55 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: authrocket
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.1.0
4
+ version: 1.2.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - thomas morgan
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2014-11-15 00:00:00.000000000 Z
11
+ date: 2015-01-26 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: ncore
15
15
  requirement: !ruby/object:Gem::Requirement
16
16
  requirements:
17
- - - ~>
17
+ - - "~>"
18
18
  - !ruby/object:Gem::Version
19
19
  version: '1.0'
20
20
  type: :runtime
21
21
  prerelease: false
22
22
  version_requirements: !ruby/object:Gem::Requirement
23
23
  requirements:
24
- - - ~>
24
+ - - "~>"
25
25
  - !ruby/object:Gem::Version
26
26
  version: '1.0'
27
27
  - !ruby/object:Gem::Dependency
28
28
  name: bundler
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
- - - ~>
31
+ - - "~>"
32
32
  - !ruby/object:Gem::Version
33
33
  version: '1.3'
34
34
  type: :development
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
38
- - - ~>
38
+ - - "~>"
39
39
  - !ruby/object:Gem::Version
40
40
  version: '1.3'
41
41
  - !ruby/object:Gem::Dependency
42
42
  name: rake
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
- - - '>='
45
+ - - ">="
46
46
  - !ruby/object:Gem::Version
47
47
  version: '0'
48
48
  type: :development
49
49
  prerelease: false
50
50
  version_requirements: !ruby/object:Gem::Requirement
51
51
  requirements:
52
- - - '>='
52
+ - - ">="
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  description: AuthRocket client for Ruby.
@@ -59,7 +59,7 @@ executables: []
59
59
  extensions: []
60
60
  extra_rdoc_files: []
61
61
  files:
62
- - .gitignore
62
+ - ".gitignore"
63
63
  - CHANGELOG.md
64
64
  - Gemfile
65
65
  - LICENSE
@@ -72,6 +72,8 @@ files:
72
72
  - lib/authrocket/api/railtie.rb
73
73
  - lib/authrocket/api/version.rb
74
74
  - lib/authrocket/app_hook.rb
75
+ - lib/authrocket/auth_provider.rb
76
+ - lib/authrocket/credential.rb
75
77
  - lib/authrocket/event.rb
76
78
  - lib/authrocket/login_policy.rb
77
79
  - lib/authrocket/membership.rb
@@ -89,17 +91,17 @@ require_paths:
89
91
  - lib
90
92
  required_ruby_version: !ruby/object:Gem::Requirement
91
93
  requirements:
92
- - - '>='
94
+ - - ">="
93
95
  - !ruby/object:Gem::Version
94
96
  version: '0'
95
97
  required_rubygems_version: !ruby/object:Gem::Requirement
96
98
  requirements:
97
- - - '>='
99
+ - - ">="
98
100
  - !ruby/object:Gem::Version
99
101
  version: '0'
100
102
  requirements: []
101
103
  rubyforge_project:
102
- rubygems_version: 2.0.6
104
+ rubygems_version: 2.4.3
103
105
  signing_key:
104
106
  specification_version: 4
105
107
  summary: AuthRocket client for Ruby