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: 9625f245d4f4954072d35c039d5534cfce0e6c518c55346a33f20a05bf53dab7
4
- data.tar.gz: a05808b7b7fa6a98599a7b30e842f433115d8228e9d6595c6aa8dec872cdb309
3
+ metadata.gz: f8160c51b0d88ee23991a6e35c124915e50feaea083c09b599765e0613a01257
4
+ data.tar.gz: '0869eec038ab3cec347f1cb117179d4e6f659429234ac021edae446719de08dd'
5
5
  SHA512:
6
- metadata.gz: e5f0149ff796a41ca14dee9babee288513ba9da2de5ea72c0423a02584a7b2ab76e49e60799d59838229bc9f2b129b8d9f81a22eace9ab5f1f5fb5f9af1aed77
7
- data.tar.gz: fab81cc20834dec39d953adfe35d525ddd9e497a00ba55cf4896a03edc5dcbc484cdfce05c496439b1793f4115d9d2150bf3db839534160c5d273de9997f5c1b
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
- uid { user["uid"] }
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"],
@@ -2,6 +2,6 @@
2
2
 
3
3
  module PublishingPlatform
4
4
  module SSO
5
- VERSION = "0.2.0"
5
+ VERSION = "0.3.0"
6
6
  end
7
7
  end
@@ -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 = publishing_platform_sso::SSO::Config.user_klass.find_for_oauth(auth_hash)
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/access_token",
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.2.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-05-31 00:00:00.000000000 Z
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