discourse_api 0.48.0 → 0.48.1
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/CHANGELOG.md +4 -0
- data/lib/discourse_api/single_sign_on.rb +39 -5
- data/lib/discourse_api/version.rb +1 -1
- data/spec/discourse_api/api/sso_spec.rb +4 -4
- metadata +2 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 80a9809c17206520d47904326a0f42571ffdfccf5af07fee84e517bf52af81bc
|
4
|
+
data.tar.gz: 0d7f9a78732e3a084f272ae4cc1e5c35de8dc938a6326d0f08d052ac38163248
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
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 = [
|
9
|
-
|
10
|
-
|
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
|
-
|
13
|
-
|
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
|
|
@@ -27,10 +27,10 @@ describe DiscourseApi::API::SSO do
|
|
27
27
|
}
|
28
28
|
end
|
29
29
|
let(:expected_unsigned_payload) do
|
30
|
-
'
|
31
|
-
'
|
32
|
-
'&
|
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.
|
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-
|
14
|
+
date: 2022-04-13 00:00:00.000000000 Z
|
15
15
|
dependencies:
|
16
16
|
- !ruby/object:Gem::Dependency
|
17
17
|
name: faraday
|