omniauth-adfs-open-id-connect 0.0.1 → 0.0.2

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: 53db3de00b2d52ce07e5c8868e3f0c11350c7ee9c61d812ada2461eb41ee1449
4
- data.tar.gz: 2f96feca3e74a390ccf8711ad0b1ad8497bbd971ff66b1aa1216e2d426615a7c
3
+ metadata.gz: 0c843d6eebecce7738319ba9df1723e0687dd9887a54ea439c791c20f8e1b3d0
4
+ data.tar.gz: 5ff4fb0aeaf71c68f248a26c7b2b431b77811cc09768427ed796f65daf05ac79
5
5
  SHA512:
6
- metadata.gz: b4c54ed04b6a6fa172434c0b5c1190cd6a2083fac621652a321f04873412a7a16b14931b07edc493a6ffdbaa4a170cb71e8cce067adaeb45b94dca204fc488b7
7
- data.tar.gz: af65e341a082bfe4ce0c03a7964c5c888354bb665b38520a2012b99281169385e16fd1061c530a72fea1094cd2011b8404dbaa3fb594d9e4fe668e82b9ae556f
6
+ metadata.gz: 87d916c4420699bf5c431cecc3450cf138ba819fdd156b265776d8b2257b2567bfa6a59655d8678d20423e429d0bb305f7dde844dca677bc0a6282197050d6d3
7
+ data.tar.gz: 81d5ee38d2b5f12309a7bd135f2694853293df13a6a548a40a163ec8b2c8c09d93325dff642dd42452306fc5fca29cd0d2e3b3a420255335a8db02d698f2970f
@@ -0,0 +1,24 @@
1
+ name: CI
2
+ on: [push]
3
+
4
+ jobs:
5
+ test:
6
+ runs-on: ubuntu-latest
7
+ steps:
8
+ - uses: actions/checkout@v2
9
+ - uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
10
+ with:
11
+ ruby-version: 2.7
12
+ bundler-cache: true
13
+ - run: bundle install
14
+ - run: bundle exec rspec
15
+ rubocop:
16
+ runs-on: ubuntu-latest
17
+ steps:
18
+ - uses: actions/checkout@v2
19
+ - uses: ruby/setup-ruby@477b21f02be01bcb8030d50f37cfec92bfa615b6
20
+ with:
21
+ ruby-version: 2.7
22
+ bundler-cache: true
23
+ - run: bundle install
24
+ - run: bundle exec rubocop
data/.rubocop.yml CHANGED
@@ -3,7 +3,10 @@ require:
3
3
 
4
4
  AllCops:
5
5
  NewCops: enable
6
- TargetRubyVersion: 2.6
6
+ TargetRubyVersion: 2.7
7
+ Naming/FileName:
8
+ Exclude:
9
+ - 'lib/adfs-open-id-connect.rb'
7
10
  Metrics/AbcSize:
8
11
  Enabled: false
9
12
  Metrics/BlockLength:
data/Gemfile CHANGED
@@ -1,6 +1,6 @@
1
1
  # frozen_string_literal: true
2
2
 
3
- source "https://rubygems.org"
3
+ source 'https://rubygems.org'
4
4
 
5
5
  # Specify your gem's dependencies in omniauth-adfs-open-id-connect.gemspec
6
6
  gemspec
@@ -4,7 +4,7 @@ module OmniAuth
4
4
  module Adfs
5
5
  module OpenId
6
6
  module Connect
7
- VERSION = '0.0.1'
7
+ VERSION = '0.0.2'
8
8
  end
9
9
  end
10
10
  end
@@ -10,7 +10,8 @@ module OmniAuth
10
10
  DEFAULT_SCOPE = 'openid profile email'
11
11
 
12
12
  def client
13
- options.authorize_params.scope = (options.scope if options.respond_to?(:scope) && options.scope) || DEFAULT_SCOPE
13
+ options.authorize_params.scope =
14
+ (options.scope if options.respond_to?(:scope) && options.scope) || DEFAULT_SCOPE
14
15
 
15
16
  options.client_options.authorize_url = "#{options.base_adfs_url}/adfs/oauth2/authorize"
16
17
  options.client_options.token_url = "#{options.base_adfs_url}/adfs/oauth2/token"
@@ -18,17 +19,17 @@ module OmniAuth
18
19
  super
19
20
  end
20
21
 
21
- uid {
22
+ uid do
22
23
  raw_info['oid']
23
- }
24
+ end
24
25
 
25
26
  info do
26
27
  {
27
- name: raw_info['name'],
28
- email: raw_info['email'] || raw_info['upn'],
29
- nickname: raw_info['unique_name'],
30
- first_name: raw_info['given_name'],
31
- last_name: raw_info['family_name']
28
+ name: raw_info['name'],
29
+ email: raw_info['email'] || raw_info['upn'],
30
+ nickname: raw_info['unique_name'],
31
+ first_name: raw_info['given_name'],
32
+ last_name: raw_info['family_name']
32
33
  }
33
34
  end
34
35
 
@@ -1,4 +1,3 @@
1
- # -*- encoding: utf-8 -*-
2
1
  # frozen_string_literal: true
3
2
 
4
3
  lib = File.expand_path('lib', __dir__)
@@ -9,8 +8,8 @@ Gem::Specification.new do |s|
9
8
  s.name = 'omniauth-adfs-open-id-connect'
10
9
  s.version = OmniAuth::Adfs::OpenId::Connect::VERSION
11
10
  s.summary = 'OAuth 2 authentication with Active Directory Federations Services OpenId Connect.'
12
- s.authors = [ 'Diego Marcet' ]
13
- s.email = [ 'systems@controlshiftlabs.com' ]
11
+ s.authors = ['Diego Marcet']
12
+ s.email = ['systems@controlshiftlabs.com']
14
13
  s.homepage = 'https://github.com/controlshift/omniauth-adfs-open-id-connect'
15
14
  s.license = 'MIT'
16
15
 
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-adfs-open-id-connect
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.0.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - Diego Marcet
@@ -115,6 +115,7 @@ executables: []
115
115
  extensions: []
116
116
  extra_rdoc_files: []
117
117
  files:
118
+ - ".github/workflows/ci.yml"
118
119
  - ".gitignore"
119
120
  - ".rspec"
120
121
  - ".rubocop.yml"