osso 0.0.5.pre.lambda → 0.0.5.pre.theta
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.
- checksums.yaml +4 -4
- data/Gemfile.lock +2 -2
- data/LICENSE +23 -21
- data/db/schema.rb +1 -2
- data/lib/osso/graphql/mutation.rb +0 -1
- data/lib/osso/graphql/mutations.rb +0 -1
- data/lib/osso/graphql/resolvers/enterprise_accounts.rb +1 -1
- data/lib/osso/graphql/types/enterprise_account.rb +0 -1
- data/lib/osso/models/identity_provider.rb +1 -1
- data/lib/osso/models/user.rb +2 -2
- data/lib/osso/routes/oauth.rb +1 -1
- data/lib/osso/version.rb +1 -1
- data/spec/routes/oauth_spec.rb +1 -2
- data/spec/support/views/multiple_providers.erb +0 -1
- metadata +2 -4
- data/lib/osso/db/migrate/20200929154117_add_users_count_to_identity_providers_and_enterprise_accounts.rb +0 -6
- data/lib/osso/graphql/mutations/delete_identity_provider.rb +0 -24
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80defe1af30691a237f560c7cbdaed6ad25dddc62aaa55c42e317ce6fb47e5f6
|
4
|
+
data.tar.gz: bf4205e1e2bfb2cc50af764e094a504a78753427669efe78f7414a67f176156b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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.
|
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.
|
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:
|
5
|
+
Licensor: Samuel Bauch
|
6
6
|
Licensed Work: osso-rb
|
7
|
-
The Licensed Work is (c) 2020
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
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@
|
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:
|
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
|
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
|
data/lib/osso/models/user.rb
CHANGED
@@ -3,8 +3,8 @@
|
|
3
3
|
module Osso
|
4
4
|
module Models
|
5
5
|
class User < ActiveRecord::Base
|
6
|
-
belongs_to :enterprise_account
|
7
|
-
belongs_to :identity_provider
|
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
|
|
data/lib/osso/routes/oauth.rb
CHANGED
@@ -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
|
-
|
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
data/spec/routes/oauth_spec.rb
CHANGED
@@ -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
|
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.
|
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-
|
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,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
|