publishing_platform_sso 0.2.0 → 0.3.0
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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f8160c51b0d88ee23991a6e35c124915e50feaea083c09b599765e0613a01257
|
4
|
+
data.tar.gz: '0869eec038ab3cec347f1cb117179d4e6f659429234ac021edae446719de08dd'
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 5c2e6d32c007315c3f453861df3a5fa4262feb7b1f97e13590a4cc5c6f594ce56a85948ef47a8a3a72977640437b9f89432586a820ac38ef4b5ba01a378889cd
|
7
|
+
data.tar.gz: 8076a72d7339be2bc0b66b86f8c06395447d02afc671cae8443eee5a0acdbddb511f967aaca805313e90d8a9b88287c8adc4d90dbc3d215d4324ed6bc0148252
|
@@ -2,10 +2,11 @@ require "omniauth-oauth2"
|
|
2
2
|
require "json"
|
3
3
|
|
4
4
|
class OmniAuth::Strategies::PublishingPlatform < OmniAuth::Strategies::OAuth2
|
5
|
-
|
6
|
-
|
5
|
+
option :name, "publishing_platform"
|
7
6
|
option :pkce, true
|
8
7
|
|
8
|
+
uid { user["uid"] }
|
9
|
+
|
9
10
|
info do
|
10
11
|
{
|
11
12
|
name: user["name"],
|
@@ -46,7 +46,7 @@ Warden::Strategies.add(:publishing_platform_sso) do
|
|
46
46
|
private
|
47
47
|
|
48
48
|
def prep_user(auth_hash)
|
49
|
-
user =
|
49
|
+
user = PublishingPlatform::SSO::Config.user_klass.find_for_oauth(auth_hash)
|
50
50
|
fail!("Couldn't process credentials") unless user
|
51
51
|
user
|
52
52
|
end
|
@@ -40,7 +40,7 @@ module PublishingPlatform
|
|
40
40
|
client_options: {
|
41
41
|
site: PublishingPlatform::SSO::Config.oauth_root_url,
|
42
42
|
authorize_url: "#{PublishingPlatform::SSO::Config.oauth_root_url}/oauth/authorize",
|
43
|
-
token_url: "#{PublishingPlatform::SSO::Config.oauth_root_url}/oauth/
|
43
|
+
token_url: "#{PublishingPlatform::SSO::Config.oauth_root_url}/oauth/token",
|
44
44
|
connection_opts: {
|
45
45
|
headers: {
|
46
46
|
user_agent: "publishing_platform_sso/#{PublishingPlatform::SSO::VERSION} (#{ENV['PUBLISHING_PLATFORM_APP_NAME']})",
|
metadata
CHANGED
@@ -1,15 +1,29 @@
|
|
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.3.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Publishing Platform
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2024-
|
11
|
+
date: 2024-06-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: publishing_platform_location
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - ">="
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - ">="
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '0'
|
13
27
|
- !ruby/object:Gem::Dependency
|
14
28
|
name: oauth2
|
15
29
|
requirement: !ruby/object:Gem::Requirement
|