osso 0.0.5.pre.lambda → 0.0.5.pre.theta

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
  SHA256:
3
- metadata.gz: f54c05ff3a991d49e4a47e036573d65f0bb2222371d73b10e665d02169d4a891
4
- data.tar.gz: 24c4ea3adf0e1c599c315c48cb9700b7ae3d0e8b3c782c564c71692f5287e858
3
+ metadata.gz: 80defe1af30691a237f560c7cbdaed6ad25dddc62aaa55c42e317ce6fb47e5f6
4
+ data.tar.gz: bf4205e1e2bfb2cc50af764e094a504a78753427669efe78f7414a67f176156b
5
5
  SHA512:
6
- metadata.gz: abd1565c7e9cdea79782176a8fde22e71a734c78fba6bde102066a5913eec4e97207295c1f1fe5dd1acfb2bc91bdb8842a72ec0cbea15a90faf3187e216a366d
7
- data.tar.gz: 43e39d4a5738b59187a4ff9dc583292450815c0ceb6d4bfae29becc7ee0de9d8ddc4d34cd4b2c1e3d577a19690fbda81c5d0dff6f2aaf71527e3b9f9d9578dd8
6
+ metadata.gz: 1b13b109aafee1913e18fc9acaf64f7876a0468ab7477c4666bf002fcde298edd3d2b72e58121998e2a7ddd93b54673e0739781f5ec57c56423369223d5550a5
7
+ data.tar.gz: 2d37d7a3fb5a8d19feb6efb3a5c45e84023b8abcb5448b0ba884dddb05112dc06f5a5d91773587e80b6530b7c94b03eef03cf96020f07ad84824b273c00c4af9
data/Gemfile.lock CHANGED
@@ -1,7 +1,7 @@
1
1
  PATH
2
2
  remote: .
3
3
  specs:
4
- osso (0.0.5.pre.lambda)
4
+ osso (0.0.5.pre.eta)
5
5
  activesupport (>= 6.0.3.2)
6
6
  graphql
7
7
  jwt
@@ -51,7 +51,7 @@ GEM
51
51
  activesupport (>= 5.0.0)
52
52
  faker (2.14.0)
53
53
  i18n (>= 1.6, < 2)
54
- graphql (1.11.5)
54
+ graphql (1.11.4)
55
55
  hashdiff (1.0.1)
56
56
  hashie (4.1.0)
57
57
  httpclient (2.8.3)
data/LICENSE CHANGED
@@ -2,31 +2,33 @@ Business Source License 1.1
2
2
 
3
3
  Parameters
4
4
 
5
- Licensor: EnterpriseOSS, Inc.
5
+ Licensor: Samuel Bauch
6
6
  Licensed Work: osso-rb
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
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
25
27
 
26
28
  Change License: Apache License, Version 2.0
27
29
 
28
30
  For information about alternative licensing arrangements for the Software,
29
- contact: hello@enterpriseoss.dev
31
+ contact: hello@enterprise-oss.dev
30
32
 
31
33
  Notice
32
34
 
@@ -106,4 +108,4 @@ other recipients of the licensed work to be provided by Licensor:
106
108
 
107
109
  3. To specify a Change Date.
108
110
 
109
- 4. Not to modify this License in any other way.
111
+ 4. Not to modify this License in any other way.
data/db/schema.rb CHANGED
@@ -10,7 +10,7 @@
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_29_154117) do
13
+ ActiveRecord::Schema.define(version: 2020_09_13_154919) do
14
14
 
15
15
  # These are extensions that must be enabled in order to support this database
16
16
  enable_extension "pgcrypto"
@@ -57,7 +57,6 @@ ActiveRecord::Schema.define(version: 2020_09_29_154117) do
57
57
  t.string "name", null: false
58
58
  t.datetime "created_at", null: false
59
59
  t.datetime "updated_at", null: false
60
- t.integer "users_count", default: 0
61
60
  t.index ["domain"], name: "index_enterprise_accounts_on_domain", unique: true
62
61
  t.index ["oauth_client_id"], name: "index_enterprise_accounts_on_oauth_client_id"
63
62
  end
@@ -11,7 +11,6 @@ module Osso
11
11
  field :create_enterprise_account, mutation: Mutations::CreateEnterpriseAccount
12
12
  field :create_oauth_client, mutation: Mutations::CreateOauthClient
13
13
  field :delete_enterprise_account, mutation: Mutations::DeleteEnterpriseAccount
14
- field :delete_identity_provider, mutation: Mutations::DeleteIdentityProvider
15
14
  field :delete_oauth_client, mutation: Mutations::DeleteOauthClient
16
15
  field :set_redirect_uris, mutation: Mutations::SetRedirectUris
17
16
  field :regenerate_oauth_credentials, mutation: Mutations::RegenerateOauthCredentials
@@ -11,7 +11,6 @@ require_relative 'mutations/create_identity_provider'
11
11
  require_relative 'mutations/create_enterprise_account'
12
12
  require_relative 'mutations/create_oauth_client'
13
13
  require_relative 'mutations/delete_enterprise_account'
14
- require_relative 'mutations/delete_identity_provider'
15
14
  require_relative 'mutations/delete_oauth_client'
16
15
  require_relative 'mutations/regenerate_oauth_credentials'
17
16
  require_relative 'mutations/set_redirect_uris'
@@ -11,7 +11,7 @@ module Osso
11
11
 
12
12
  accounts = Osso::Models::EnterpriseAccount
13
13
 
14
- accounts = accounts.order(sort_column.underscore => sort_order_sym(sort_order)) if sort_column && sort_order
14
+ accounts = accounts.order(sort_column => sort_order_sym(sort_order)) if sort_column && sort_order
15
15
 
16
16
  accounts.all
17
17
  end
@@ -14,7 +14,6 @@ module Osso
14
14
  field :domain, String, null: false
15
15
  field :identity_providers, [Types::IdentityProvider], null: true
16
16
  field :status, String, null: false
17
- field :users_count, Integer, null: false
18
17
 
19
18
  def status
20
19
  'active'
@@ -6,7 +6,7 @@ module Osso
6
6
  class IdentityProvider < ActiveRecord::Base
7
7
  belongs_to :enterprise_account
8
8
  belongs_to :oauth_client
9
- has_many :users, dependent: :delete_all
9
+ has_many :users
10
10
  before_save :set_status
11
11
  validate :sso_cert_valid
12
12
 
@@ -3,8 +3,8 @@
3
3
  module Osso
4
4
  module Models
5
5
  class User < ActiveRecord::Base
6
- belongs_to :enterprise_account, counter_cache: true
7
- belongs_to :identity_provider, counter_cache: true
6
+ belongs_to :enterprise_account
7
+ belongs_to :identity_provider
8
8
  has_many :authorization_codes, dependent: :delete_all
9
9
  has_many :access_tokens, dependent: :delete_all
10
10
 
@@ -24,7 +24,7 @@ module Osso
24
24
  redirect "/auth/saml/#{enterprise.provider.id}" if enterprise.single_provider?
25
25
 
26
26
  @providers = enterprise.identity_providers.not_pending
27
- return erb :multiple_providers if @providers.count > 1
27
+ erb :multiple_providers if @providers.count > 1
28
28
 
29
29
  raise Osso::Error::MissingConfiguredIdentityProvider.new(domain: params[:domain])
30
30
  rescue Osso::Error::Base => e
data/lib/osso/version.rb CHANGED
@@ -1,5 +1,5 @@
1
1
  # frozen_string_literal: true
2
2
 
3
3
  module Osso
4
- VERSION = '0.0.5-lambda'
4
+ VERSION = '0.0.5-theta'
5
5
  end
@@ -48,7 +48,7 @@ describe Osso::Oauth do
48
48
 
49
49
  describe 'for an enterprise domain with multiple SAML providers' do
50
50
  it 'renders the multiple providers screen' do
51
- enterprise = create(:enterprise_with_multiple_providers, oauth_client: client)
51
+ enterprise = create(:enterprise_with_multiple_providers)
52
52
 
53
53
  get(
54
54
  '/oauth/authorize',
@@ -59,7 +59,6 @@ describe Osso::Oauth do
59
59
  )
60
60
 
61
61
  expect(last_response).to be_ok
62
- expect(last_response.body).to eq("MULITPLE PROVIDERS")
63
62
  end
64
63
  end
65
64
  end
@@ -1 +0,0 @@
1
- MULITPLE PROVIDERS
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: osso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5.pre.lambda
4
+ version: 0.0.5.pre.theta
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Bauch
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2020-10-01 00:00:00.000000000 Z
11
+ date: 2020-09-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: activesupport
@@ -273,7 +273,6 @@ files:
273
273
  - lib/osso/db/migrate/20200826201852_create_app_config.rb
274
274
  - lib/osso/db/migrate/20200913154919_add_one_login_to_identity_provider_service_enum.rb
275
275
  - lib/osso/db/migrate/20200916125543_add_google_to_identity_provider_service_enum.rb
276
- - lib/osso/db/migrate/20200929154117_add_users_count_to_identity_providers_and_enterprise_accounts.rb
277
276
  - lib/osso/error/account_configuration_error.rb
278
277
  - lib/osso/error/error.rb
279
278
  - lib/osso/error/missing_saml_attribute_error.rb
@@ -288,7 +287,6 @@ files:
288
287
  - lib/osso/graphql/mutations/create_identity_provider.rb
289
288
  - lib/osso/graphql/mutations/create_oauth_client.rb
290
289
  - lib/osso/graphql/mutations/delete_enterprise_account.rb
291
- - lib/osso/graphql/mutations/delete_identity_provider.rb
292
290
  - lib/osso/graphql/mutations/delete_oauth_client.rb
293
291
  - lib/osso/graphql/mutations/regenerate_oauth_credentials.rb
294
292
  - lib/osso/graphql/mutations/set_redirect_uris.rb
@@ -1,6 +0,0 @@
1
- class AddUsersCountToIdentityProvidersAndEnterpriseAccounts < ActiveRecord::Migration[6.0]
2
- def change
3
- add_column :enterprise_accounts, :users_count, :integer, default: 0
4
- add_column :identity_providers, :users_count, :integer, default: 0
5
- end
6
- end
@@ -1,24 +0,0 @@
1
- # frozen_string_literal: true
2
-
3
- module Osso
4
- module GraphQL
5
- module Mutations
6
- class DeleteIdentityProvider < BaseMutation
7
- null false
8
-
9
- argument :id, ID, required: true
10
-
11
- field :identity_provider, Types::IdentityProvider, null: true
12
- field :errors, [String], null: false
13
-
14
- def resolve(id:)
15
- identity_provider = Osso::Models::IdentityProvider.find(id)
16
-
17
- return response_data(identity_provider: nil) if identity_provider.destroy
18
-
19
- response_error(identity_provider.errors)
20
- end
21
- end
22
- end
23
- end
24
- end