osso 0.0.5.pre.theta → 0.0.7

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.
Files changed (78) hide show
  1. checksums.yaml +4 -4
  2. data/.buildkite/pipeline.yml +6 -4
  3. data/.github/dependabot.yml +8 -0
  4. data/.github/workflows/automerge.yml +19 -0
  5. data/.rubocop.yml +4 -1
  6. data/Gemfile +2 -2
  7. data/Gemfile.lock +58 -37
  8. data/LICENSE +21 -23
  9. data/Rakefile +2 -0
  10. data/bin/annotate +3 -1
  11. data/db/schema.rb +41 -3
  12. data/lib/osso.rb +0 -1
  13. data/lib/osso/db/migrate/20200929154117_add_users_count_to_identity_providers_and_enterprise_accounts.rb +6 -0
  14. data/lib/osso/db/migrate/20201023142158_add_rodauth_tables.rb +47 -0
  15. data/lib/osso/db/migrate/20201105122026_add_token_index_to_access_tokens.rb +5 -0
  16. data/lib/osso/db/migrate/20201106154936_add_requested_to_authorization_codes_and_access_tokens.rb +6 -0
  17. data/lib/osso/db/migrate/20201109160851_add_sso_issuer_to_identity_providers.rb +12 -0
  18. data/lib/osso/db/migrate/20201110190754_remove_oauth_client_id_from_enterprise_accounts.rb +9 -0
  19. data/lib/osso/db/migrate/20201112160120_add_ping_to_identity_provider_service_enum.rb +28 -0
  20. data/lib/osso/db/migrate/20201125143501_add_salesforce_to_provider_service_enum.rb +28 -0
  21. data/lib/osso/error/account_configuration_error.rb +1 -0
  22. data/lib/osso/error/oauth_error.rb +6 -3
  23. data/lib/osso/graphql/mutation.rb +2 -0
  24. data/lib/osso/graphql/mutations.rb +2 -0
  25. data/lib/osso/graphql/mutations/create_enterprise_account.rb +0 -7
  26. data/lib/osso/graphql/mutations/create_identity_provider.rb +7 -6
  27. data/lib/osso/graphql/mutations/delete_identity_provider.rb +24 -0
  28. data/lib/osso/graphql/mutations/invite_admin_user.rb +43 -0
  29. data/lib/osso/graphql/query.rb +8 -0
  30. data/lib/osso/graphql/resolvers/enterprise_accounts.rb +3 -3
  31. data/lib/osso/graphql/types.rb +2 -2
  32. data/lib/osso/graphql/types/admin_user.rb +9 -0
  33. data/lib/osso/graphql/types/base_object.rb +1 -1
  34. data/lib/osso/graphql/types/enterprise_account.rb +1 -0
  35. data/lib/osso/graphql/types/identity_provider.rb +2 -0
  36. data/lib/osso/graphql/types/identity_provider_service.rb +3 -1
  37. data/lib/osso/lib/app_config.rb +1 -1
  38. data/lib/osso/lib/route_map.rb +0 -16
  39. data/lib/osso/lib/saml_handler.rb +5 -0
  40. data/lib/osso/models/access_token.rb +4 -2
  41. data/lib/osso/models/account.rb +34 -0
  42. data/lib/osso/models/authorization_code.rb +2 -1
  43. data/lib/osso/models/enterprise_account.rb +3 -1
  44. data/lib/osso/models/identity_provider.rb +19 -5
  45. data/lib/osso/models/models.rb +1 -0
  46. data/lib/osso/models/oauth_client.rb +0 -1
  47. data/lib/osso/models/user.rb +2 -2
  48. data/lib/osso/routes/admin.rb +39 -33
  49. data/lib/osso/routes/auth.rb +9 -9
  50. data/lib/osso/routes/oauth.rb +35 -17
  51. data/lib/osso/version.rb +1 -1
  52. data/lib/osso/views/admin.erb +5 -0
  53. data/lib/osso/views/error.erb +1 -0
  54. data/lib/osso/views/layout.erb +0 -0
  55. data/lib/osso/views/multiple_providers.erb +1 -0
  56. data/lib/osso/views/welcome.erb +0 -0
  57. data/lib/tasks/bootstrap.rake +25 -4
  58. data/osso-rb.gemspec +5 -0
  59. data/spec/factories/account.rb +24 -0
  60. data/spec/factories/enterprise_account.rb +11 -3
  61. data/spec/factories/identity_providers.rb +10 -2
  62. data/spec/factories/user.rb +4 -0
  63. data/spec/graphql/mutations/configure_identity_provider_spec.rb +1 -1
  64. data/spec/graphql/mutations/create_enterprise_account_spec.rb +0 -14
  65. data/spec/graphql/mutations/create_identity_provider_spec.rb +59 -8
  66. data/spec/graphql/query/identity_provider_spec.rb +2 -2
  67. data/spec/models/enterprise_account_spec.rb +18 -0
  68. data/spec/models/identity_provider_spec.rb +24 -3
  69. data/spec/routes/admin_spec.rb +7 -41
  70. data/spec/routes/auth_spec.rb +17 -18
  71. data/spec/routes/oauth_spec.rb +88 -5
  72. data/spec/spec_helper.rb +3 -3
  73. data/spec/support/views/layout.erb +1 -0
  74. data/spec/support/views/multiple_providers.erb +1 -0
  75. metadata +107 -7
  76. data/lib/osso/helpers/auth.rb +0 -94
  77. data/lib/osso/helpers/helpers.rb +0 -8
  78. data/spec/helpers/auth_spec.rb +0 -269
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 80defe1af30691a237f560c7cbdaed6ad25dddc62aaa55c42e317ce6fb47e5f6
4
- data.tar.gz: bf4205e1e2bfb2cc50af764e094a504a78753427669efe78f7414a67f176156b
3
+ metadata.gz: 3557c5b1128c7a026fa1ddb14cb570b6d247231f3dc7ef22c4ef60af427ec3a2
4
+ data.tar.gz: fa59daf216455edc141fc1c1dd20b965cb90122dfa7e0e30ad3d3fc46a348951
5
5
  SHA512:
6
- metadata.gz: 1b13b109aafee1913e18fc9acaf64f7876a0468ab7477c4666bf002fcde298edd3d2b72e58121998e2a7ddd93b54673e0739781f5ec57c56423369223d5550a5
7
- data.tar.gz: 2d37d7a3fb5a8d19feb6efb3a5c45e84023b8abcb5448b0ba884dddb05112dc06f5a5d91773587e80b6530b7c94b03eef03cf96020f07ad84824b273c00c4af9
6
+ metadata.gz: 4089820668fa27aa45e7dbb92bf58713202657ec71e6bb2ca24d79b19176e9e444f9c114119489c08417909b7b6403c7e3a1342bf4caa3174d0d5dca77d822f3
7
+ data.tar.gz: 41f3deba4a448aa35c03cf5630b1eeb9784fa200b5bdd020a2c5e29d4b8f8df95da1af0d6dea942d71cdfff2c691948412053a834fd249f8e4b66116e4d025f5
@@ -2,8 +2,10 @@ steps:
2
2
  - name: ":rspec:"
3
3
  commands:
4
4
  - bundle install
5
- - bundle exec rake db:drop
6
- - bundle exec rake db:create
5
+ - dropdb ossorb-development --if-exists
6
+ - dropdb ossorb-test --if-exists
7
+ - createdb ossorb-development
8
+ - createdb ossorb-test
7
9
  - RACK_ENV=test bundle exec rake db:migrate
8
10
  - bundle exec rspec
9
11
  artifact_paths:
@@ -17,8 +19,8 @@ steps:
17
19
  prefix: '/var/lib/buildkite-agent/builds/enterprise-oss-bk-1/enterpriseoss/osso-rb/'
18
20
 
19
21
  - block: ":rubygems: Publish :red_button:"
20
- branches: "main"
22
+ if: build.tag != null
21
23
 
22
24
  - name: "Push :rubygems:"
23
25
  commands: "./bin/publish"
24
- branches: "main"
26
+ if: build.tag != null
@@ -0,0 +1,8 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: bundler
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ labels:
8
+ - "dependencies"
@@ -0,0 +1,19 @@
1
+ name: auto-merge
2
+
3
+ on:
4
+ pull_request:
5
+
6
+ jobs:
7
+ auto-approve:
8
+ runs-on: ubuntu-latest
9
+ steps:
10
+ - uses: actions/checkout@v2
11
+ - uses: ahmadnassri/action-dependabot-auto-merge@v2
12
+ with:
13
+ target: minor
14
+ github-token: ${{ secrets.TOKEN }}
15
+ - uses: hmarr/auto-approve-action@v2.0.0
16
+ if: github.actor == 'dependabot[bot]'
17
+ with:
18
+ github-token: "${{ secrets.TOKEN }}"
19
+
@@ -79,4 +79,7 @@ Style/Documentation:
79
79
  Enabled: false
80
80
  Exclude:
81
81
  - 'spec/**/*'
82
- - 'db/**.*'
82
+ - 'db/**.*'
83
+
84
+ Gemspec/RequiredRubyVersion:
85
+ Enabled: false
data/Gemfile CHANGED
@@ -10,10 +10,10 @@ group :test do
10
10
  gem 'faker'
11
11
  gem 'pg'
12
12
  gem 'rack-test'
13
- gem 'rspec', '~> 3.2'
13
+ gem 'rspec', '~> 3.10'
14
14
  gem 'rubocop'
15
15
  gem 'simplecov', '= 0.17', require: false
16
- gem 'webmock', '~> 3.0'
16
+ gem 'webmock', '~> 3.10'
17
17
  end
18
18
 
19
19
  gemspec
@@ -1,16 +1,21 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- osso (0.0.5.pre.eta)
4
+ osso (0.0.7)
5
5
  activesupport (>= 6.0.3.2)
6
+ bcrypt (~> 3.1.13)
6
7
  graphql
7
8
  jwt
9
+ mail (~> 2.7.1)
8
10
  omniauth-multi-provider
9
11
  omniauth-saml
10
12
  rack (>= 2.1.4)
11
13
  rack-contrib
12
14
  rack-oauth2
13
15
  rake
16
+ rodauth (~> 2.6.0)
17
+ sequel (>= 5.37, < 5.40)
18
+ sequel-activerecord_connection (>= 0.3, < 2.0)
14
19
  sinatra
15
20
  sinatra-activerecord
16
21
  sinatra-contrib
@@ -18,12 +23,12 @@ PATH
18
23
  GEM
19
24
  remote: https://rubygems.org/
20
25
  specs:
21
- activemodel (6.0.3.3)
22
- activesupport (= 6.0.3.3)
23
- activerecord (6.0.3.3)
24
- activemodel (= 6.0.3.3)
25
- activesupport (= 6.0.3.3)
26
- activesupport (6.0.3.3)
26
+ activemodel (6.0.3.4)
27
+ activesupport (= 6.0.3.4)
28
+ activerecord (6.0.3.4)
29
+ activemodel (= 6.0.3.4)
30
+ activesupport (= 6.0.3.4)
31
+ activesupport (6.0.3.4)
27
32
  concurrent-ruby (~> 1.0, >= 1.0.2)
28
33
  i18n (>= 0.7, < 2)
29
34
  minitest (~> 5.1)
@@ -32,11 +37,14 @@ GEM
32
37
  addressable (2.7.0)
33
38
  public_suffix (>= 2.0.2, < 5.0)
34
39
  aes_key_wrap (1.1.0)
40
+ after_commit_everywhere (0.1.5)
41
+ activerecord (>= 4.2)
35
42
  annotate (3.1.1)
36
43
  activerecord (>= 3.2, < 7.0)
37
44
  rake (>= 10.4, < 14.0)
38
45
  ast (2.4.1)
39
46
  attr_required (1.0.1)
47
+ bcrypt (3.1.16)
40
48
  bindata (2.4.8)
41
49
  coderay (1.1.3)
42
50
  concurrent-ruby (1.1.7)
@@ -49,9 +57,9 @@ GEM
49
57
  docile (1.3.2)
50
58
  factory_bot (6.1.0)
51
59
  activesupport (>= 5.0.0)
52
- faker (2.14.0)
60
+ faker (2.15.1)
53
61
  i18n (>= 1.6, < 2)
54
- graphql (1.11.4)
62
+ graphql (1.11.6)
55
63
  hashdiff (1.0.1)
56
64
  hashie (4.1.0)
57
65
  httpclient (2.8.3)
@@ -63,7 +71,10 @@ GEM
63
71
  aes_key_wrap
64
72
  bindata
65
73
  jwt (2.2.2)
74
+ mail (2.7.1)
75
+ mini_mime (>= 0.1.1)
66
76
  method_source (1.0.0)
77
+ mini_mime (1.0.2)
67
78
  mini_portile2 (2.4.0)
68
79
  minitest (5.14.2)
69
80
  multi_json (1.15.0)
@@ -76,11 +87,11 @@ GEM
76
87
  rack (>= 1.6.2, < 3)
77
88
  omniauth-multi-provider (0.2.1)
78
89
  omniauth
79
- omniauth-saml (1.10.2)
90
+ omniauth-saml (1.10.3)
80
91
  omniauth (~> 1.3, >= 1.3.2)
81
92
  ruby-saml (~> 1.9)
82
- parallel (1.19.2)
83
- parser (2.7.1.4)
93
+ parallel (1.20.1)
94
+ parser (2.7.2.0)
84
95
  ast (~> 2.4.1)
85
96
  pg (1.2.3)
86
97
  pry (0.13.1)
@@ -88,7 +99,7 @@ GEM
88
99
  method_source (~> 1.0)
89
100
  public_suffix (4.0.6)
90
101
  rack (2.2.3)
91
- rack-contrib (2.2.0)
102
+ rack-contrib (2.3.0)
92
103
  rack (~> 2.0)
93
104
  rack-oauth2 (1.16.0)
94
105
  activesupport
@@ -102,36 +113,46 @@ GEM
102
113
  rack (>= 1.0, < 3)
103
114
  rainbow (3.0.0)
104
115
  rake (13.0.1)
105
- regexp_parser (1.8.0)
116
+ regexp_parser (2.0.0)
106
117
  rexml (3.2.4)
107
- rspec (3.9.0)
108
- rspec-core (~> 3.9.0)
109
- rspec-expectations (~> 3.9.0)
110
- rspec-mocks (~> 3.9.0)
111
- rspec-core (3.9.2)
112
- rspec-support (~> 3.9.3)
113
- rspec-expectations (3.9.2)
118
+ roda (3.38.0)
119
+ rack
120
+ rodauth (2.6.0)
121
+ roda (>= 2.6.0)
122
+ sequel (>= 4)
123
+ rspec (3.10.0)
124
+ rspec-core (~> 3.10.0)
125
+ rspec-expectations (~> 3.10.0)
126
+ rspec-mocks (~> 3.10.0)
127
+ rspec-core (3.10.0)
128
+ rspec-support (~> 3.10.0)
129
+ rspec-expectations (3.10.0)
114
130
  diff-lcs (>= 1.2.0, < 2.0)
115
- rspec-support (~> 3.9.0)
116
- rspec-mocks (3.9.1)
131
+ rspec-support (~> 3.10.0)
132
+ rspec-mocks (3.10.0)
117
133
  diff-lcs (>= 1.2.0, < 2.0)
118
- rspec-support (~> 3.9.0)
119
- rspec-support (3.9.3)
120
- rubocop (0.91.0)
134
+ rspec-support (~> 3.10.0)
135
+ rspec-support (3.10.0)
136
+ rubocop (1.5.2)
121
137
  parallel (~> 1.10)
122
- parser (>= 2.7.1.1)
138
+ parser (>= 2.7.1.5)
123
139
  rainbow (>= 2.2.2, < 4.0)
124
- regexp_parser (>= 1.7)
140
+ regexp_parser (>= 1.8, < 3.0)
125
141
  rexml
126
- rubocop-ast (>= 0.4.0, < 1.0)
142
+ rubocop-ast (>= 1.2.0, < 2.0)
127
143
  ruby-progressbar (~> 1.7)
128
144
  unicode-display_width (>= 1.4.0, < 2.0)
129
- rubocop-ast (0.4.2)
130
- parser (>= 2.7.1.4)
145
+ rubocop-ast (1.3.0)
146
+ parser (>= 2.7.1.5)
131
147
  ruby-progressbar (1.10.1)
132
148
  ruby-saml (1.11.0)
133
149
  nokogiri (>= 1.5.10)
134
150
  ruby2_keywords (0.0.2)
151
+ sequel (5.39.0)
152
+ sequel-activerecord_connection (1.2.0)
153
+ activerecord (>= 4.2, < 7)
154
+ after_commit_everywhere (~> 0.1.5)
155
+ sequel (~> 5.16)
135
156
  simplecov (0.17.0)
136
157
  docile (~> 1.1)
137
158
  json (>= 1.8, < 3)
@@ -142,7 +163,7 @@ GEM
142
163
  rack (~> 2.2)
143
164
  rack-protection (= 2.1.0)
144
165
  tilt (~> 2.0)
145
- sinatra-activerecord (2.0.18)
166
+ sinatra-activerecord (2.0.21)
146
167
  activerecord (>= 4.1)
147
168
  sinatra (>= 1.0)
148
169
  sinatra-contrib (2.1.0)
@@ -153,14 +174,14 @@ GEM
153
174
  tilt (~> 2.0)
154
175
  thread_safe (0.3.6)
155
176
  tilt (2.0.10)
156
- tzinfo (1.2.7)
177
+ tzinfo (1.2.8)
157
178
  thread_safe (~> 0.1)
158
179
  unicode-display_width (1.7.0)
159
- webmock (3.9.1)
180
+ webmock (3.10.0)
160
181
  addressable (>= 2.3.6)
161
182
  crack (>= 0.3.2)
162
183
  hashdiff (>= 0.4.0, < 2.0.0)
163
- zeitwerk (2.4.0)
184
+ zeitwerk (2.4.1)
164
185
 
165
186
  PLATFORMS
166
187
  ruby
@@ -175,10 +196,10 @@ DEPENDENCIES
175
196
  pg
176
197
  pry
177
198
  rack-test
178
- rspec (~> 3.2)
199
+ rspec (~> 3.10)
179
200
  rubocop
180
201
  simplecov (= 0.17)
181
- webmock (~> 3.0)
202
+ webmock (~> 3.10)
182
203
 
183
204
  BUNDLED WITH
184
205
  2.1.4
data/LICENSE CHANGED
@@ -2,33 +2,31 @@ Business Source License 1.1
2
2
 
3
3
  Parameters
4
4
 
5
- Licensor: Samuel Bauch
5
+ Licensor: EnterpriseOSS, Inc.
6
6
  Licensed Work: osso-rb
7
- The Licensed Work is (c) 2020 Samuel Bauch.
8
- Additional Use Grant: You may make use of the Licensed Work, provided that you do
9
- not use the Licensed Work in a Single Sign On Management
10
- Service.
11
-
12
- A "Single Sign On Management Service" is an offering
13
- (be it free or commercial) that uses the Licensed Work
14
- to allow third parties (other than your employees and
15
- contractors) to access the functionality of the
16
- Licensed Work such that any fourth parties directly
17
- benefit from the authentication, configuration, or
18
- documentation features of the Licensed Work.
19
-
20
- You thus may only use the Licensed Work in a manner
21
- whereby parties who directly benefit from the
22
- authentication, configuration, or documentation features
23
- of the Licensed Work are yourself, your employees or
24
- contractors, and your customers or partners.
25
-
26
- Change Date: 2023-05-01
7
+ The Licensed Work is (c) 2020 EnterpriseOSS, Inc.
8
+
9
+ Additional Use Grant: You and your Authorized Users may make use of the
10
+ Licensed Work for your internal business purposes,
11
+ provided that you do not (i) rent, lease, copy, transfer,
12
+ resell, sublicense, lease, time-share, or otherwise provide
13
+ access to the Licensed Work to a third party (except
14
+ Authorized Users) or (ii) incorporate the Licensed Work
15
+ (or any portion of such) with, or use it with or to provide,
16
+ any site, product, or service, other than on sites/applications
17
+ owned and operated by you.
18
+
19
+ An “Authorized User” is defined as an individual person
20
+ (e.g. your employee, contractor, agent) who is registered and
21
+ permitted by you to use the Licensed Work subject to these
22
+ restrictions.
23
+
24
+ Change Date: 2025-10-01
27
25
 
28
26
  Change License: Apache License, Version 2.0
29
27
 
30
28
  For information about alternative licensing arrangements for the Software,
31
- contact: hello@enterprise-oss.dev
29
+ contact: hello@enterpriseoss.dev
32
30
 
33
31
  Notice
34
32
 
@@ -108,4 +106,4 @@ other recipients of the licensed work to be provided by Licensor:
108
106
 
109
107
  3. To specify a Change Date.
110
108
 
111
- 4. Not to modify this License in any other way.
109
+ 4. Not to modify this License in any other way.
data/Rakefile CHANGED
@@ -4,6 +4,8 @@
4
4
  # to tell ActiveRecord where to find the database
5
5
  # schema and migrations
6
6
 
7
+ ENV['SESSION_SECRET'] ||= 'rake-secret'
8
+
7
9
  require 'bundler/gem_tasks'
8
10
  require 'sinatra/activerecord/rake'
9
11
  require './lib/osso'
@@ -1 +1,3 @@
1
- annotate --require osso.rb --models --model-dir ./lib/osso/models/ --position bottom -k -i
1
+ #!/bin/sh
2
+
3
+ annotate --require osso.rb --models --model-dir=./lib/osso/models/ --position bottom -k -i
@@ -10,9 +10,10 @@
10
10
  #
11
11
  # It's strongly recommended that you check this file into your version control system.
12
12
 
13
- ActiveRecord::Schema.define(version: 2020_09_13_154919) do
13
+ ActiveRecord::Schema.define(version: 2020_11_25_143501) do
14
14
 
15
15
  # These are extensions that must be enabled in order to support this database
16
+ enable_extension "citext"
16
17
  enable_extension "pgcrypto"
17
18
  enable_extension "plpgsql"
18
19
 
@@ -23,10 +24,44 @@ ActiveRecord::Schema.define(version: 2020_09_13_154919) do
23
24
  t.datetime "updated_at", precision: 6, null: false
24
25
  t.uuid "user_id"
25
26
  t.uuid "oauth_client_id"
27
+ t.jsonb "requested", default: {}
26
28
  t.index ["oauth_client_id"], name: "index_access_tokens_on_oauth_client_id"
29
+ t.index ["token", "expires_at"], name: "index_access_tokens_on_token_and_expires_at", unique: true
27
30
  t.index ["user_id"], name: "index_access_tokens_on_user_id"
28
31
  end
29
32
 
33
+ create_table "account_password_hashes", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
34
+ t.string "password_hash", null: false
35
+ end
36
+
37
+ create_table "account_password_reset_keys", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
38
+ t.string "key", null: false
39
+ t.datetime "deadline", null: false
40
+ t.datetime "email_last_sent", default: -> { "CURRENT_TIMESTAMP" }, null: false
41
+ end
42
+
43
+ create_table "account_remember_keys", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
44
+ t.string "key", null: false
45
+ t.datetime "deadline", null: false
46
+ end
47
+
48
+ create_table "account_verification_keys", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
49
+ t.string "key", null: false
50
+ t.datetime "requested_at", default: -> { "CURRENT_TIMESTAMP" }, null: false
51
+ t.datetime "email_last_sent", default: -> { "CURRENT_TIMESTAMP" }, null: false
52
+ t.uuid "account_id"
53
+ t.index ["account_id"], name: "index_account_verification_keys_on_account_id"
54
+ end
55
+
56
+ create_table "accounts", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
57
+ t.citext "email", null: false
58
+ t.integer "status_id", default: 1, null: false
59
+ t.string "role", default: "admin", null: false
60
+ t.string "oauth_client_id"
61
+ t.index ["email"], name: "index_accounts_on_email", unique: true, where: "(status_id = ANY (ARRAY[1, 2]))"
62
+ t.index ["oauth_client_id"], name: "index_accounts_on_oauth_client_id"
63
+ end
64
+
30
65
  create_table "app_configs", id: :uuid, default: -> { "gen_random_uuid()" }, force: :cascade do |t|
31
66
  t.string "contact_email"
32
67
  t.string "logo_url"
@@ -43,6 +78,7 @@ ActiveRecord::Schema.define(version: 2020_09_13_154919) do
43
78
  t.datetime "updated_at", precision: 6, null: false
44
79
  t.uuid "user_id"
45
80
  t.uuid "oauth_client_id"
81
+ t.jsonb "requested", default: {}
46
82
  t.index ["oauth_client_id"], name: "index_authorization_codes_on_oauth_client_id"
47
83
  t.index ["token"], name: "index_authorization_codes_on_token", unique: true
48
84
  t.index ["user_id"], name: "index_authorization_codes_on_user_id"
@@ -53,12 +89,11 @@ ActiveRecord::Schema.define(version: 2020_09_13_154919) do
53
89
  t.uuid "external_uuid"
54
90
  t.integer "external_int_id"
55
91
  t.string "external_id"
56
- t.uuid "oauth_client_id"
57
92
  t.string "name", null: false
58
93
  t.datetime "created_at", null: false
59
94
  t.datetime "updated_at", null: false
95
+ t.integer "users_count", default: 0
60
96
  t.index ["domain"], name: "index_enterprise_accounts_on_domain", unique: true
61
- t.index ["oauth_client_id"], name: "index_enterprise_accounts_on_oauth_client_id"
62
97
  end
63
98
 
64
99
  # Could not dump table "identity_providers" because of following StandardError
@@ -94,5 +129,8 @@ ActiveRecord::Schema.define(version: 2020_09_13_154919) do
94
129
  t.index ["enterprise_account_id"], name: "index_users_on_enterprise_account_id"
95
130
  end
96
131
 
132
+ add_foreign_key "account_password_hashes", "accounts", column: "id"
133
+ add_foreign_key "account_password_reset_keys", "accounts", column: "id"
134
+ add_foreign_key "account_remember_keys", "accounts", column: "id"
97
135
  add_foreign_key "users", "identity_providers"
98
136
  end