publishing_platform_sso 0.3.2 → 0.4.0
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/README.md +1 -0
- data/lib/publishing_platform_sso/version.rb +1 -1
- data/lib/publishing_platform_sso/warden_config.rb +3 -1
- metadata +3 -8
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 5db45f6cf6588fdd48c90f970d1e93c510d9657c95af940a059aa6880f510113
|
4
|
+
data.tar.gz: 6d970b25d32bb7be21c6b7cb4ccc03567672c29770bfdb5e7f71f257d8998f6f
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 75829509bfa165316a74e556d67b0494fb9aa7baf9fbeee633d0499cd5cc65f56ccb39884e855faf3c801a97806bda1286afe58127a4247f8517c7f673607291
|
7
|
+
data.tar.gz: cf00b01c3c82f6a0f1306d702dac5ff468c6652042991320928029f509b492a1e7b71ee2f27602af69a2f027bc1bee802375b6ad536f255f98a58eaaccd9e15d
|
data/README.md
CHANGED
@@ -66,7 +66,7 @@ Warden::Strategies.add(:mock_publishing_platform_sso) do
|
|
66
66
|
logger.warn("Authenticating with mock_publishing_platform_sso strategy")
|
67
67
|
|
68
68
|
test_user = PublishingPlatform::SSO.test_user
|
69
|
-
test_user ||= PublishingPlatform::SSO::Config.user_klass.first
|
69
|
+
test_user ||= ENV["PUBLISHING_PLATFORM_SSO_MOCK_INVALID"].present? ? nil : PublishingPlatform::SSO::Config.user_klass.first
|
70
70
|
if test_user
|
71
71
|
# Brute force ensure test user has correct perms to signin
|
72
72
|
unless test_user.has_permission?("signin")
|
@@ -74,6 +74,8 @@ Warden::Strategies.add(:mock_publishing_platform_sso) do
|
|
74
74
|
test_user.update_attribute(:permissions, permissions << "signin")
|
75
75
|
end
|
76
76
|
success!(test_user)
|
77
|
+
elsif Rails.env.test? && ENV["PUBLISHING_PLATFORM_SSO_MOCK_INVALID"].present?
|
78
|
+
fail!(:invalid)
|
77
79
|
else
|
78
80
|
raise "publishing_platform_sso running in mock mode and no test user found. Normally we'd load the first user in the database. Create a user in the database."
|
79
81
|
end
|
metadata
CHANGED
@@ -1,14 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: publishing_platform_sso
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.4.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Publishing Platform
|
8
|
-
autorequire:
|
9
8
|
bindir: bin
|
10
9
|
cert_chain: []
|
11
|
-
date:
|
10
|
+
date: 1980-01-02 00:00:00.000000000 Z
|
12
11
|
dependencies:
|
13
12
|
- !ruby/object:Gem::Dependency
|
14
13
|
name: publishing_platform_location
|
@@ -207,7 +206,6 @@ dependencies:
|
|
207
206
|
- !ruby/object:Gem::Version
|
208
207
|
version: '0'
|
209
208
|
description: Client for Publishing Platform's OAuth 2-based SSO.
|
210
|
-
email:
|
211
209
|
executables: []
|
212
210
|
extensions: []
|
213
211
|
extra_rdoc_files: []
|
@@ -233,11 +231,9 @@ files:
|
|
233
231
|
- lib/publishing_platform_sso/user.rb
|
234
232
|
- lib/publishing_platform_sso/version.rb
|
235
233
|
- lib/publishing_platform_sso/warden_config.rb
|
236
|
-
homepage:
|
237
234
|
licenses:
|
238
235
|
- MIT
|
239
236
|
metadata: {}
|
240
|
-
post_install_message:
|
241
237
|
rdoc_options: []
|
242
238
|
require_paths:
|
243
239
|
- lib
|
@@ -252,8 +248,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
252
248
|
- !ruby/object:Gem::Version
|
253
249
|
version: '0'
|
254
250
|
requirements: []
|
255
|
-
rubygems_version: 3.
|
256
|
-
signing_key:
|
251
|
+
rubygems_version: 3.6.7
|
257
252
|
specification_version: 4
|
258
253
|
summary: Client for Publishing Platform's OAuth 2-based SSO.
|
259
254
|
test_files: []
|