omniauth-uaa-oauth2 1.0.0 → 1.1.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: 9e8de9c63b6c5f6302ff2188fcb99045128f8af146d6014c8a0e26403e23e7b0
4
- data.tar.gz: 995fc9391a8e7c91d6464adc34565a825f7c6853877e4b1467326043e38aeb21
3
+ metadata.gz: 9d52b2174a96317fc6070f2b6056b9ad3574b7cd50d2c1af315b7655e986d782
4
+ data.tar.gz: a5b184719b7d83ceee0a7958cd15775134825a0ad705402f883e561922ba284a
5
5
  SHA512:
6
- metadata.gz: 85a906769d31270b17cf11c0ee1c9f2f905ff7fe2d36d7024a522ffb3d2da756714854f8e3ff71b237944ab11794dbf60161ca44d115986c8c05732a57a3ae0c
7
- data.tar.gz: 88982fdba7d3fc827a892bf0fc3317e8261ce7fd1b2d0cd94c9c7730d8d6c9b157bbe6d2f88b1c2d1e82f99dc52fad7c67d0ae0d5767c0689e60162a2633a1b6
6
+ metadata.gz: 90cab4e75cda93e21e3bde285cd50cf2e7ae8c85a9ca9f8e3180fe2d709ce9343a25e3254058a612dae28a9f4cb2358428101f47fb2225f2da8ae5d47ebcb7d2
7
+ data.tar.gz: 471be4941b7a15a084a7d3b6facc044b8bb332f31525d69712f0d1a04ca67e58f920799abfd1cd3c5fa635e5a4a3a0dcd0fe0e9deae0e35feb20ef759a5945ee
@@ -0,0 +1,17 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "github-actions"
4
+ directory: "/"
5
+ schedule:
6
+ interval: daily
7
+ time: "11:00"
8
+ open-pull-requests-limit: 10
9
+ - package-ecosystem: bundler
10
+ directory: "/"
11
+ schedule:
12
+ interval: daily
13
+ time: "11:00"
14
+ open-pull-requests-limit: 10
15
+ allow:
16
+ - dependency-type: direct
17
+ - dependency-type: indirect
@@ -0,0 +1,41 @@
1
+ name: Ruby Gem
2
+
3
+ on: workflow_dispatch
4
+
5
+ jobs:
6
+ build:
7
+ name: Build + Publish
8
+ runs-on: ubuntu-latest
9
+ permissions:
10
+ contents: read
11
+ packages: write
12
+
13
+ steps:
14
+ - uses: actions/checkout@v3
15
+ - name: Set up Ruby 2.6
16
+ uses: ruby/setup-ruby@v1
17
+ with:
18
+ ruby-version: '2.6'
19
+
20
+ - name: Publish to GPR
21
+ run: |
22
+ mkdir -p $HOME/.gem
23
+ touch $HOME/.gem/credentials
24
+ chmod 0600 $HOME/.gem/credentials
25
+ printf -- "---\n:github: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
26
+ gem build *.gemspec
27
+ gem push --KEY github --host https://rubygems.pkg.github.com/${OWNER} *.gem
28
+ env:
29
+ GEM_HOST_API_KEY: "Bearer ${{secrets.GITHUB_TOKEN}}"
30
+ OWNER: ${{ github.repository_owner }}
31
+
32
+ - name: Publish to RubyGems
33
+ run: |
34
+ mkdir -p $HOME/.gem
35
+ touch $HOME/.gem/credentials
36
+ chmod 0600 $HOME/.gem/credentials
37
+ printf -- "---\n:rubygems_api_key: ${GEM_HOST_API_KEY}\n" > $HOME/.gem/credentials
38
+ gem build *.gemspec
39
+ gem push *.gem
40
+ env:
41
+ GEM_HOST_API_KEY: "${{secrets.RUBYGEMS_AUTH_TOKEN}}"
@@ -0,0 +1,37 @@
1
+ # This workflow uses actions that are not certified by GitHub.
2
+ # They are provided by a third-party and are governed by
3
+ # separate terms of service, privacy policy, and support
4
+ # documentation.
5
+ # This workflow will download a prebuilt Ruby version, install dependencies and run tests with Rake
6
+ # For more information see: https://github.com/marketplace/actions/setup-ruby-jruby-and-truffleruby
7
+
8
+ name: Ruby
9
+
10
+ on:
11
+ push:
12
+ branches: [ "master" ]
13
+ pull_request:
14
+ branches: [ "master" ]
15
+
16
+ permissions:
17
+ contents: read
18
+
19
+ jobs:
20
+ test:
21
+
22
+ runs-on: ubuntu-latest
23
+ strategy:
24
+ matrix:
25
+ ruby-version: ['3.0', '3.1', '3.2']
26
+
27
+ steps:
28
+ - uses: actions/checkout@v3
29
+ - name: Set up Ruby
30
+ # To automatically get bug fixes and new Ruby versions for ruby/setup-ruby,
31
+ # change this to (see https://github.com/ruby/setup-ruby#versioning):
32
+ uses: ruby/setup-ruby@v1
33
+ with:
34
+ ruby-version: ${{ matrix.ruby-version }}
35
+ bundler-cache: true # runs 'bundle install' and caches installed gems automatically
36
+ - name: Run tests
37
+ run: bundle exec rake
data/Gemfile CHANGED
@@ -13,8 +13,6 @@
13
13
 
14
14
  source 'http://rubygems.org'
15
15
 
16
- gem 'rake', '< 11.0'
17
-
18
16
  gemspec
19
17
 
20
18
  group :example do
data/README.md CHANGED
@@ -1,4 +1,4 @@
1
- CloudFoundry UAA OmniAuth Strategy
1
+ Cloud Foundry UAA OmniAuth Strategy
2
2
  ==================================
3
3
 
4
4
  OmniAuth strategy for authenticating users using the CloudFoundry UAA server.
@@ -16,5 +16,13 @@ For example usage see:
16
16
  * https://github.com/starkandwayne/ultimate-guide-to-uaa-examples/tree/master/ruby/omniauth-login-and-uaa-api-calls
17
17
  * https://github.com/starkandwayne/ultimate-guide-to-uaa-examples/tree/master/ruby/resource-server-wrapper-ui
18
18
 
19
+ Warning: Unlike the `omniauth-oauth2` gem, this gem does not support the oauth2 'state' security parameter.
19
20
 
20
- Warning: Unlike the omniauth-oauth2 gem, this gem does not support the oauth2 'state' security parameter.
21
+ Your `omniauth-uaa-oauth2` client application will need a corresponding UAA client registered that includes the `authorization_code` authorization grant type, and redirect URIs back to the full URL to your application's `/auth/cloudfoundry/callback` endpoint. For example:
22
+
23
+ ```text
24
+ uaa create-client omniauth-login-only -s omniauth-login-only \
25
+ --authorized_grant_types authorization_code,refresh_token \
26
+ --scope openid \
27
+ --redirect_uri http://localhost:9292/auth/cloudfoundry/callback,http://127.0.0.1:9292/auth/cloudfoundry/callback
28
+ ```
@@ -119,7 +119,7 @@ module OmniAuth
119
119
  log :info, "In callback phase #{request.query_string}"
120
120
  self.access_token = build_access_token(request.query_string)
121
121
  self.access_token = refresh(access_token) if !access_token.empty? && expired?(access_token)
122
- log :info, "Got access token #{access_token.inspect}"
122
+ log :debug, "Got access token #{access_token.inspect}"
123
123
 
124
124
  super
125
125
  end
@@ -1,5 +1,5 @@
1
1
  module OmniAuth
2
2
  module Cloudfoundry
3
- VERSION = "1.0.0"
3
+ VERSION = "1.1.1"
4
4
  end
5
5
  end
@@ -2,10 +2,10 @@
2
2
  require File.expand_path('../lib/omniauth/uaa_oauth2/version', __FILE__)
3
3
 
4
4
  Gem::Specification.new do |gem|
5
- gem.authors = ["Joel D'sa", "Dave Syer", "Dale Olds", "Vidya Valmikinathan", "Luke Taylor"]
6
- gem.email = ["jdsa@vmware.com", "olds@vmware.com", "dsyer@vmware.com", "vidya@vmware.com", "ltaylor@vmware.com"]
7
- gem.description = %q{An OmniAuth strategy for the Cloudfoundry UAA}
8
- gem.summary = %q{An OmniAuth strategy for the Cloudfoundry UAA}
5
+ gem.authors = ["Dr Nic Williams", "Joel D'sa", "Dave Syer", "Dale Olds", "Vidya Valmikinathan", "Luke Taylor"]
6
+ gem.email = ["drnicwilliams@gmail.com", "jdsa@vmware.com", "olds@vmware.com", "dsyer@vmware.com", "vidya@vmware.com", "ltaylor@vmware.com"]
7
+ gem.description = %q{An OmniAuth strategy for the Cloud Foundry UAA}
8
+ gem.summary = %q{An OmniAuth strategy for the Cloud Foundry UAA}
9
9
  gem.homepage = ""
10
10
 
11
11
  gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
@@ -15,9 +15,9 @@ Gem::Specification.new do |gem|
15
15
  gem.require_paths = ["lib"]
16
16
  gem.version = OmniAuth::Cloudfoundry::VERSION
17
17
 
18
- gem.add_runtime_dependency 'omniauth', '~> 1.0'
19
- gem.add_runtime_dependency 'cf-uaa-lib', ['>= 3.2', '< 4.0']
18
+ gem.add_runtime_dependency 'omniauth', '>= 1', '< 3'
19
+ gem.add_runtime_dependency 'cf-uaa-lib', ['>= 3.2', '< 5.0']
20
20
 
21
- gem.add_development_dependency 'rspec', '~> 2.6.0'
21
+ gem.add_development_dependency 'rspec'
22
22
  gem.add_development_dependency 'rake'
23
23
  end
@@ -126,14 +126,14 @@ describe OmniAuth::Strategies::Cloudfoundry do
126
126
  describe 'empty?' do
127
127
  it 'is empty when initialized without info' do
128
128
  token = OmniAuth::Strategies::CFAccessToken.new
129
- token.empty?.should be_true
129
+ token.should be_empty
130
130
  end
131
131
 
132
132
  it 'is not empty when initialized with info' do
133
133
  token = OmniAuth::Strategies::CFAccessToken.new({
134
134
  'access_token' => 'some-token',
135
135
  })
136
- token.empty?.should be_false
136
+ token.should_not be_empty
137
137
  end
138
138
  end
139
139
 
metadata CHANGED
@@ -1,9 +1,10 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-uaa-oauth2
3
3
  version: !ruby/object:Gem::Version
4
- version: 1.0.0
4
+ version: 1.1.1
5
5
  platform: ruby
6
6
  authors:
7
+ - Dr Nic Williams
7
8
  - Joel D'sa
8
9
  - Dave Syer
9
10
  - Dale Olds
@@ -12,22 +13,28 @@ authors:
12
13
  autorequire:
13
14
  bindir: bin
14
15
  cert_chain: []
15
- date: 2018-07-22 00:00:00.000000000 Z
16
+ date: 2023-05-11 00:00:00.000000000 Z
16
17
  dependencies:
17
18
  - !ruby/object:Gem::Dependency
18
19
  name: omniauth
19
20
  requirement: !ruby/object:Gem::Requirement
20
21
  requirements:
21
- - - "~>"
22
+ - - ">="
23
+ - !ruby/object:Gem::Version
24
+ version: '1'
25
+ - - "<"
22
26
  - !ruby/object:Gem::Version
23
- version: '1.0'
27
+ version: '3'
24
28
  type: :runtime
25
29
  prerelease: false
26
30
  version_requirements: !ruby/object:Gem::Requirement
27
31
  requirements:
28
- - - "~>"
32
+ - - ">="
33
+ - !ruby/object:Gem::Version
34
+ version: '1'
35
+ - - "<"
29
36
  - !ruby/object:Gem::Version
30
- version: '1.0'
37
+ version: '3'
31
38
  - !ruby/object:Gem::Dependency
32
39
  name: cf-uaa-lib
33
40
  requirement: !ruby/object:Gem::Requirement
@@ -37,7 +44,7 @@ dependencies:
37
44
  version: '3.2'
38
45
  - - "<"
39
46
  - !ruby/object:Gem::Version
40
- version: '4.0'
47
+ version: '5.0'
41
48
  type: :runtime
42
49
  prerelease: false
43
50
  version_requirements: !ruby/object:Gem::Requirement
@@ -47,21 +54,21 @@ dependencies:
47
54
  version: '3.2'
48
55
  - - "<"
49
56
  - !ruby/object:Gem::Version
50
- version: '4.0'
57
+ version: '5.0'
51
58
  - !ruby/object:Gem::Dependency
52
59
  name: rspec
53
60
  requirement: !ruby/object:Gem::Requirement
54
61
  requirements:
55
- - - "~>"
62
+ - - ">="
56
63
  - !ruby/object:Gem::Version
57
- version: 2.6.0
64
+ version: '0'
58
65
  type: :development
59
66
  prerelease: false
60
67
  version_requirements: !ruby/object:Gem::Requirement
61
68
  requirements:
62
- - - "~>"
69
+ - - ">="
63
70
  - !ruby/object:Gem::Version
64
- version: 2.6.0
71
+ version: '0'
65
72
  - !ruby/object:Gem::Dependency
66
73
  name: rake
67
74
  requirement: !ruby/object:Gem::Requirement
@@ -76,8 +83,9 @@ dependencies:
76
83
  - - ">="
77
84
  - !ruby/object:Gem::Version
78
85
  version: '0'
79
- description: An OmniAuth strategy for the Cloudfoundry UAA
86
+ description: An OmniAuth strategy for the Cloud Foundry UAA
80
87
  email:
88
+ - drnicwilliams@gmail.com
81
89
  - jdsa@vmware.com
82
90
  - olds@vmware.com
83
91
  - dsyer@vmware.com
@@ -87,6 +95,9 @@ executables: []
87
95
  extensions: []
88
96
  extra_rdoc_files: []
89
97
  files:
98
+ - ".github/dependabot.yml"
99
+ - ".github/workflows/gem-push.yml"
100
+ - ".github/workflows/ruby.yml"
90
101
  - ".gitignore"
91
102
  - ".travis.yml"
92
103
  - Gemfile
@@ -120,11 +131,8 @@ required_rubygems_version: !ruby/object:Gem::Requirement
120
131
  - !ruby/object:Gem::Version
121
132
  version: '0'
122
133
  requirements: []
123
- rubyforge_project:
124
- rubygems_version: 2.7.6
134
+ rubygems_version: 3.0.3.1
125
135
  signing_key:
126
136
  specification_version: 4
127
- summary: An OmniAuth strategy for the Cloudfoundry UAA
128
- test_files:
129
- - spec/omniauth/strategies/uaa_oauth2_spec.rb
130
- - spec/spec_helper.rb
137
+ summary: An OmniAuth strategy for the Cloud Foundry UAA
138
+ test_files: []