discourse_api 0.48.0 → 0.48.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: '047378d84854b5dae025d57550c071bf9944257a4048bd1be5b51b389e995dc3'
4
- data.tar.gz: af75df86361c631aba91dc685c26e2f0d392597fbd561ef93b628f319f907457
3
+ metadata.gz: 80a9809c17206520d47904326a0f42571ffdfccf5af07fee84e517bf52af81bc
4
+ data.tar.gz: 0d7f9a78732e3a084f272ae4cc1e5c35de8dc938a6326d0f08d052ac38163248
5
5
  SHA512:
6
- metadata.gz: 7a435c702c930231c817d8192a20ddd859c3102cb3a9928ad4402dc1c019330d4dca79bd407f00ffa9e9038cebe7a0c138c081a019f4373711bfea67104c1a00
7
- data.tar.gz: 8664b7d0efa3982e223a61af2a7d28ea2744100fdf1f3dcef99c9c1c3f7c59481c264ac04092c9b0c4c6a5f7559bd1fa99c4010d69fb1451f1a7875678a06d19
6
+ metadata.gz: 3c6b7abab4c2c7febbe201a2dba4698930d327f77343e4eefec1261a4e87004b8957d4dcb06ee9d94caf57b56b8a8a12c908d292832a252912a898ccc44d96ca
7
+ data.tar.gz: 9b7490943e570a12cca7a6c69998c4eba8d2fdd06df8e301a5cbc1444524238a7372becd8c58bb6b0c4ee8f7e8323056ebc682994bbaaae9784f18f2705f03d4
data/CHANGELOG.md CHANGED
@@ -6,6 +6,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
6
6
 
7
7
  ## [Unreleased]
8
8
 
9
+ ## [0.48.1] - 2022-04-13
10
+ ### Added
11
+ - New attributes for Discourse Connect (aka SSO)
12
+
9
13
  ## [0.48.0] - 2022-01-28
10
14
  ### Added
11
15
  - `group_add_owners` method (#239)
@@ -5,12 +5,46 @@ require 'openssl'
5
5
 
6
6
  module DiscourseApi
7
7
  class SingleSignOn
8
- ACCESSORS = [:nonce, :name, :username, :email, :avatar_url, :profile_background_url, :card_background_url, :avatar_force_update, :require_activation,
9
- :bio, :external_id, :return_sso_url, :admin, :moderator, :suppress_welcome_message, :title,
10
- :add_groups, :remove_groups, :groups, :locale, :locale_force_update]
8
+ ACCESSORS = [
9
+ :add_groups,
10
+ :admin,
11
+ :avatar_force_update,
12
+ :avatar_url,
13
+ :bio,
14
+ :card_background_url,
15
+ :confirmed_2fa,
16
+ :email,
17
+ :external_id,
18
+ :groups,
19
+ :locale,
20
+ :locale_force_update,
21
+ :moderator,
22
+ :name,
23
+ :no_2fa_methods,
24
+ :nonce,
25
+ :profile_background_url,
26
+ :remove_groups,
27
+ :require_2fa,
28
+ :require_activation,
29
+ :return_sso_url,
30
+ :suppress_welcome_message,
31
+ :title,
32
+ :username,
33
+ ]
34
+
11
35
  FIXNUMS = []
12
- BOOLS = [:avatar_force_update, :admin, :moderator, :require_activation, :suppress_welcome_message,
13
- :locale_force_update]
36
+
37
+ BOOLS = [
38
+ :admin,
39
+ :avatar_force_update,
40
+ :confirmed_2fa,
41
+ :locale_force_update,
42
+ :moderator,
43
+ :no_2fa_methods,
44
+ :require_2fa,
45
+ :require_activation,
46
+ :suppress_welcome_message,
47
+ ]
14
48
  ARRAYS = [:groups]
15
49
  #NONCE_EXPIRY_TIME = 10.minutes # minutes is a rails method and is causing an error. Is this needed in the api?
16
50
 
@@ -1,4 +1,4 @@
1
1
  # frozen_string_literal: true
2
2
  module DiscourseApi
3
- VERSION = "0.48.0"
3
+ VERSION = "0.48.1"
4
4
  end
@@ -27,10 +27,10 @@ describe DiscourseApi::API::SSO do
27
27
  }
28
28
  end
29
29
  let(:expected_unsigned_payload) do
30
- 'name=Some+User&username=some_user&email=some%40email.com&'\
31
- 'avatar_url=https%3A%2F%2Fwww.website.com&external_id=abc&title=ruby'\
32
- '&add_groups=a&add_groups=b&remove_groups=c&remove_groups=d&custom.field_2=potato&'\
33
- 'custom.custom.field_1=tomato'
30
+ 'add_groups=a&add_groups=b&avatar_url=https%3A%2F%2Fwww.website.com'\
31
+ '&email=some%40email.com&external_id=abc&name=Some+User&remove_groups=c'\
32
+ '&remove_groups=d&title=ruby&username=some_user&custom.field_2=potato'\
33
+ '&custom.custom.field_1=tomato'
34
34
  end
35
35
  let(:sso_double) { DiscourseApi::SingleSignOn.parse_hash(params) }
36
36
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: discourse_api
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.48.0
4
+ version: 0.48.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sam Saffron
@@ -11,7 +11,7 @@ authors:
11
11
  autorequire:
12
12
  bindir: bin
13
13
  cert_chain: []
14
- date: 2022-01-28 00:00:00.000000000 Z
14
+ date: 2022-04-13 00:00:00.000000000 Z
15
15
  dependencies:
16
16
  - !ruby/object:Gem::Dependency
17
17
  name: faraday