auth0 5.1.0 → 5.1.1

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: 268e36ef0f352a266607bdad5435b4ebddfacc3b29dd4aa4d922966950ca0e46
4
- data.tar.gz: 2190414d235036db1218c7560d67a1cb9a300f02495d2fdaa1c267398480d130
3
+ metadata.gz: 6363fb309ed21f92b00feb47e3df1a870fb5bdec7e6786eafb436d6c93249afd
4
+ data.tar.gz: d45130f889436020fea8acb76385fa4a5f884b8c04cda38345ccb06b4408699d
5
5
  SHA512:
6
- metadata.gz: 52706c2e0c0ed270a987ec83568e94cf37d9b4a951ef00f813fed275c6a0ddb15b87324111a399b34d09b3ee448446140d197670a003be6f2bcd930295f73867
7
- data.tar.gz: 9f316b486484eb9af039b3f39670a259fc9d1e41b249e7faa4916d1b6345a54ba6233f2d2dc4daf4c55dc41756269062a5a7fb539b9c6285224a9b45140911eb
6
+ metadata.gz: c736ed7cc86e68643659bec55bca8b26e5a2262f0a1c81547c505c3e9375698a24e4094a72f08412fb6962abe3717c3055bb5ad7c86a91626e1e9585e102a27d
7
+ data.tar.gz: f201783d610980d679e5c13741c278acd070060f917b4015dc098e2c56c81b265ef3a1e3901849a6662ba97c8627b95b80337e9562461cf825baaa6eec64b7f6
data/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # Change Log
2
2
 
3
+ ## [v5.1.01(https://github.com/auth0/ruby-auth0/tree/v5.1.1) (2021-04-14)
4
+
5
+ [Full Changelog](https://github.com/auth0/ruby-auth0/compare/v5.1.0..v5.1.1)
6
+
7
+ **Fixed**
8
+
9
+ - Fixes create_organizations_enabled_connection [\#269](https://github.com/auth0/ruby-auth0/pull/269) ([davidpatrick](https://github.com/apps/davidpatrick))
10
+
11
+
3
12
  ## [v5.1.0](https://github.com/auth0/ruby-auth0/tree/v5.1.0) (2021-04-09)
4
13
 
5
14
  [Full Changelog](https://github.com/auth0/ruby-auth0/compare/v5.0.1..v5.1.0)
@@ -127,15 +127,18 @@ module Auth0
127
127
  # Add an enabled connection for an Organization
128
128
  # @see https://auth0.com/docs/api/management/v2/#!/Organizations/post_enabled_connections
129
129
  # @param organization_id [string] The Organization ID
130
+ # @param connection_id [string] The Organization ID
130
131
  # @param assign_membership_on_login [boolean] flag to allow assign membership on login
131
132
  #
132
133
  # @return [json] Returns the connection for the given organization
133
- def create_organizations_enabled_connection(organization_id, assign_membership_on_login: false)
134
+ def create_organizations_enabled_connection(organization_id, connection_id, assign_membership_on_login: false)
134
135
  raise Auth0::MissingOrganizationId, 'Must supply a valid organization_id' if organization_id.to_s.empty?
136
+ raise Auth0::InvalidParameter, 'Must supply a valid connection id' if connection_id.to_s.empty?
135
137
  path = "#{organizations_enabled_connections_path(organization_id)}"
136
138
 
137
139
  body = {}
138
140
  body[:assign_membership_on_login] = assign_membership_on_login
141
+ body[:connection_id] = connection_id
139
142
 
140
143
  post(path, body)
141
144
  end
data/lib/auth0/version.rb CHANGED
@@ -1,4 +1,4 @@
1
1
  # current version of gem
2
2
  module Auth0
3
- VERSION = '5.1.0'.freeze
3
+ VERSION = '5.1.1'.freeze
4
4
  end
@@ -247,14 +247,19 @@ describe Auth0::Api::V2::Organizations do
247
247
  expect(@instance).to receive(:post).with(
248
248
  '/api/v2/organizations/org_id/enabled_connections',
249
249
  {
250
+ connection_id: 'connection_id',
250
251
  assign_membership_on_login: true
251
252
  }
252
253
  )
253
- @instance.create_organizations_enabled_connection('org_id', assign_membership_on_login: true)
254
+ @instance.create_organizations_enabled_connection('org_id', 'connection_id', assign_membership_on_login: true)
254
255
  end
255
256
 
256
257
  it 'is expected to raise an exception when the organization id is empty' do
257
- expect { @instance.create_organizations_enabled_connection(nil) }.to raise_exception(Auth0::MissingOrganizationId)
258
+ expect { @instance.create_organizations_enabled_connection(nil, nil) }.to raise_exception(Auth0::MissingOrganizationId)
259
+ end
260
+
261
+ it 'is expected to raise an exception when the connection id is empty' do
262
+ expect { @instance.create_organizations_enabled_connection('123', nil) }.to raise_error 'Must supply a valid connection id'
258
263
  end
259
264
  end
260
265
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: auth0
3
3
  version: !ruby/object:Gem::Version
4
- version: 5.1.0
4
+ version: 5.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Auth0
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2021-04-09 00:00:00.000000000 Z
14
+ date: 2021-04-15 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: rest-client
@@ -636,7 +636,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
636
636
  - !ruby/object:Gem::Version
637
637
  version: '0'
638
638
  requirements: []
639
- rubygems_version: 3.1.4
639
+ rubygems_version: 3.2.16
640
640
  signing_key:
641
641
  specification_version: 4
642
642
  summary: Auth0 API Client