publishing_platform_sso 0.2.0 → 0.2.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:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 1d0997b4ba60d3c32ad03710a268999d67def500d23c1ca4cb9d9d06e1cb3529
|
4
|
+
data.tar.gz: f4f46270119c8482d4aa9b3389e3899b96088657097f57d8af2052e5f32a0d1b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 1b0262de6a24093b20c261507f27dcb79c2793ea800655f4b0b4247621d72ef751516e88be0a70f0ff2a0c33aef4462e3b9d7d666e8fd3c60c794a1ab0c5f8ae
|
7
|
+
data.tar.gz: 94b5961cab7aa239c98f9edec585da99b4a9ef2c0e144380f77937f58f44600b4c7168ba49c4033fbb15d2babeb0cbefd9c4b6bd6717dc29fd900c1fab492ea4
|
@@ -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']})",
|