omniauth-eve_online-sso 0.1.0 → 0.5.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
- SHA1:
3
- metadata.gz: e1b0781cfda49e4982e2f3e32738c19398223a6a
4
- data.tar.gz: 22a2c5a7171f2fd78e50be64c09a6992f8eff3fc
2
+ SHA256:
3
+ metadata.gz: 4152a8b6c59b47705f4dd3b0dfaf54f6c7f3ef1fcfd18224c5bb4093dd9c9450
4
+ data.tar.gz: 32efb033c2da393d8e23c4a114d957e3bfd4bb2f6e10c9c85f7b476b5d6ba05c
5
5
  SHA512:
6
- metadata.gz: a6e7dc7040072bf77dffd1b0e7079d52849ab49bb4725b7ca01bf0aa2fae88a7dccc587534523161acbc82182bab8d6db59a7def883c8a59b5683574528384ce
7
- data.tar.gz: cc21decff096499b3f2068debe1b2d8ddbea9965940f0d342dd3d00a648e290ef4e9821cd9371f71ce9920806768b50116477bd0fac675aa35b5dbbb27d86a5b
6
+ metadata.gz: 4c78bdfcd4bcf3f5f8371331038a00e8c01d24650c6fc4f0a1442317b755a0952ed60ea72bb308358f0cd34c23d5bb64c607b99ee6701e917e3f8166d5264edc
7
+ data.tar.gz: b45b7f207aaced15b55fdd3b8be36af4105f6b5d8ba412dac5dc7d47aba7f1f66c85eb494ea42b4d62084742b5fcfc4fb613519e5dd60144a8a1e390558344f3
@@ -0,0 +1 @@
1
+ * @biow0lf
@@ -0,0 +1 @@
1
+ github: biow0lf
@@ -0,0 +1,14 @@
1
+ version: 2
2
+ updates:
3
+ - package-ecosystem: "bundler"
4
+ directory: "/"
5
+ schedule:
6
+ interval: "daily"
7
+ open-pull-requests-limit: 99
8
+ allow:
9
+ - dependency-type: "direct"
10
+ - dependency-type: "indirect"
11
+ - package-ecosystem: "github-actions"
12
+ directory: "/"
13
+ schedule:
14
+ interval: "daily"
@@ -0,0 +1,18 @@
1
+ name: mdl
2
+
3
+ on:
4
+ push:
5
+ branches:
6
+ - main
7
+ pull_request:
8
+ branches:
9
+ - main
10
+
11
+ jobs:
12
+ mdl:
13
+ runs-on: ubuntu-latest
14
+
15
+ steps:
16
+ - uses: actions/checkout@v2
17
+ - name: run mdl
18
+ uses: actionshub/markdownlint@2.0.2
data/.gitignore CHANGED
@@ -1,13 +1,11 @@
1
1
  /.bundle/
2
2
  /.yardoc
3
- /Gemfile.lock
4
3
  /_yardoc/
5
4
  /coverage/
6
5
  /doc/
7
6
  /pkg/
8
7
  /spec/reports/
9
8
  /tmp/
10
- /.ruby-version
11
9
  /.idea
12
10
 
13
11
  # rspec failure tracking
data/.mdlrc ADDED
@@ -0,0 +1,2 @@
1
+ rules "~MD013"
2
+
data/.rspec CHANGED
@@ -1,2 +1 @@
1
1
  --format documentation
2
- --color
data/.rubocop.yml CHANGED
@@ -1,148 +1,16 @@
1
- require: rubocop-thread_safety
2
- #require: rubocop-rspec
3
-
4
- inherit_from: .rubocop_todo.yml
5
-
6
1
  AllCops:
7
- TargetRubyVersion: 1.9
8
- DisplayCopNames: true
2
+ TargetRubyVersion: 2.6
9
3
  DisplayStyleGuide: true
4
+ NewCops: enable
10
5
 
11
- Rails:
12
- Enabled: false
13
-
14
- # Allow block comments
15
- Style/BlockComments:
6
+ Style/StringLiterals:
16
7
  Enabled: false
17
8
 
18
- # Disable
19
9
  Style/Documentation:
20
10
  Enabled: false
21
11
 
22
- Layout/DotPosition:
23
- Enabled: true
24
- EnforcedStyle: leading
25
-
26
- Style/FrozenStringLiteralComment:
27
- Enabled: true
28
- EnforcedStyle: never
29
-
30
- # Recheck this cop later
31
- Style/FlipFlop:
32
- Description: 'Checks for flip flops'
33
- StyleGuide: '#no-flip-flops'
34
- Enabled: true
35
-
36
- # Recheck this cop later
37
- Style/RedundantException:
38
- Description: "Checks for an obsolete RuntimeException argument in raise/fail."
39
- StyleGuide: '#no-explicit-runtimeerror'
40
- Enabled: true
41
-
42
- # Recheck this cop later
43
- Style/SafeNavigation:
44
- Description: >-
45
- This cop transforms usages of a method call safeguarded by
46
- a check for the existance of the object to
47
- safe navigation (`&.`).
48
- Enabled: true
49
-
50
- # Recheck this cop later
51
- Style/SignalException:
52
- Description: 'Checks for proper usage of fail and raise.'
53
- StyleGuide: '#prefer-raise-over-fail'
54
- Enabled: true
55
-
56
- # Enable with EnforcedStyle is space
57
- Layout/SpaceInsideStringInterpolation:
58
- EnforcedStyle: space
59
- Enabled: true
60
-
61
- # Enable with EnforcedStyle is single_quotes
62
- Style/StringLiterals:
63
- EnforcedStyle: single_quotes
64
- Enabled: true
65
-
66
- # Limit lines to 80 characters
67
- Metrics/LineLength:
68
- Enabled: false
69
-
70
- # TimeZone stuff
71
- Rails/TimeZone:
72
- EnforcedStyle: strict
73
- Enabled: true
74
-
75
- # Identifies possible cases where Active Record save! or related should be used.
76
- Rails/SaveBang:
77
- Enabled: true
78
-
79
- # Suggests the usage of an auto resource cleanup version of a method (if available)
80
- Style/AutoResourceCleanup:
81
- Enabled: true
82
-
83
- # Preferred collection methods
84
- Style/CollectionMethods:
85
- Enabled: true
86
-
87
- # Use UTF-8 as the source file encoding
88
- Style/Encoding:
89
- Enabled: true
90
-
91
- # Use `raise` or `fail` with an explicit exception class and
92
- # message, rather than just a message.
93
- Style/ImplicitRuntimeError:
94
- Enabled: true
95
-
96
- # Avoid chaining a method call on a do...end block
97
- Style/MethodCalledOnDoEndBlock:
98
- Enabled: true
99
-
100
- # Check for a newline after the assignment operator in multi-line assignments
101
- Layout/MultilineAssignmentLayout:
102
- Enabled: true
103
-
104
- # Just ignore order of gems in Gemfile
105
12
  Bundler/OrderedGems:
106
13
  Enabled: false
107
14
 
108
- # Use %i or %I for an array of symbols.
109
- Style/SymbolArray:
110
- Enabled: false
111
-
112
- Style/GuardClause:
113
- Enabled: false
114
-
115
- Style/IfUnlessModifier:
15
+ Layout/LineLength:
116
16
  Enabled: false
117
-
118
- Style/ConditionalAssignment:
119
- Enabled: true
120
- EnforcedStyle: assign_to_condition
121
-
122
- Style/NegatedIf:
123
- Enabled: false
124
-
125
- # rubocop-thread_safety
126
- ThreadSafety:
127
- Enabled: true
128
-
129
- Style/GlobalVars:
130
- Enabled: true
131
-
132
- Style/ClassVars:
133
- Enabled: true
134
-
135
- Style/MutableConstant:
136
- Enabled: true
137
-
138
- # rubocop-rspec
139
- RSpec/NamedSubject:
140
- Enabled: false
141
-
142
- RSpec/ImplicitExpect:
143
- Enabled: true
144
- EnforcedStyle: should
145
-
146
- RSpec/MessageSpies:
147
- Enabled: true
148
- EnforcedStyle: receive
data/.ruby-version ADDED
@@ -0,0 +1 @@
1
+ 3.0.2
data/.travis.yml CHANGED
@@ -2,17 +2,15 @@ sudo: false
2
2
  language: ruby
3
3
  cache: bundler
4
4
  rvm:
5
- - 1.9.3
6
- - 2.0
7
- - 2.1
8
- - 2.2.7
9
- - 2.3.4
10
- - 2.4.1
5
+ - 2.3.7
6
+ - 2.4.4
7
+ - 2.5.1
11
8
  - ruby-head
12
9
 
13
- before_install: gem install bundler -v 1.15.4
10
+ before_install: gem install bundler
14
11
 
15
12
  script:
16
13
  - bundle exec rake
17
14
  - bundle exec codeclimate-test-reporter
18
15
  - bundle exec rubocop
16
+ - bundle exec mdl README.md
data/CHANGELOG.md ADDED
@@ -0,0 +1,15 @@
1
+ # Changelog
2
+
3
+ ## v0.5.0
4
+
5
+ * Fix error when decoding OAuth2 tokens containing a single scope
6
+
7
+ ## v0.4.0
8
+
9
+ * Update `v2` EveOnline SSO support
10
+
11
+ ## v0.3.0
12
+
13
+ * Migrate to `/v2/oauth/authorize` and `/v2/oauth/token`
14
+ * Bump minimal required ruby version to `2.6`
15
+ * Drop proxy support
data/Gemfile CHANGED
@@ -1,8 +1,10 @@
1
- source 'https://rubygems.org'
1
+ # frozen_string_literal: true
2
+
3
+ source "https://rubygems.org"
2
4
 
3
5
  # Specify your gem's dependencies in omniauth-eve_online-sso.gemspec
4
6
  gemspec
5
7
 
6
- gem 'awesome_print', require: 'ap'
7
- gem 'pry'
8
- gem 'rubocop', platforms: [:ruby_19, :ruby_20, :ruby_21, :ruby_22, :ruby_23, :ruby_24]
8
+ gem "awesome_print", require: "ap"
9
+ gem "pry"
10
+ gem "standard"
data/Gemfile.lock ADDED
@@ -0,0 +1,121 @@
1
+ PATH
2
+ remote: .
3
+ specs:
4
+ omniauth-eve_online-sso (0.4.0)
5
+ jwt
6
+ omniauth-oauth2
7
+
8
+ GEM
9
+ remote: https://rubygems.org/
10
+ specs:
11
+ ast (2.4.2)
12
+ awesome_print (1.9.2)
13
+ coderay (1.1.3)
14
+ diff-lcs (1.4.4)
15
+ docile (1.4.0)
16
+ faraday (1.8.0)
17
+ faraday-em_http (~> 1.0)
18
+ faraday-em_synchrony (~> 1.0)
19
+ faraday-excon (~> 1.1)
20
+ faraday-httpclient (~> 1.0.1)
21
+ faraday-net_http (~> 1.0)
22
+ faraday-net_http_persistent (~> 1.1)
23
+ faraday-patron (~> 1.0)
24
+ faraday-rack (~> 1.0)
25
+ multipart-post (>= 1.2, < 3)
26
+ ruby2_keywords (>= 0.0.4)
27
+ faraday-em_http (1.0.0)
28
+ faraday-em_synchrony (1.0.0)
29
+ faraday-excon (1.1.0)
30
+ faraday-httpclient (1.0.1)
31
+ faraday-net_http (1.0.1)
32
+ faraday-net_http_persistent (1.2.0)
33
+ faraday-patron (1.0.0)
34
+ faraday-rack (1.0.0)
35
+ hashie (4.1.0)
36
+ jwt (2.3.0)
37
+ method_source (1.0.0)
38
+ multi_json (1.15.0)
39
+ multi_xml (0.6.0)
40
+ multipart-post (2.1.1)
41
+ oauth2 (1.4.7)
42
+ faraday (>= 0.8, < 2.0)
43
+ jwt (>= 1.0, < 3.0)
44
+ multi_json (~> 1.3)
45
+ multi_xml (~> 0.5)
46
+ rack (>= 1.2, < 3)
47
+ omniauth (2.0.4)
48
+ hashie (>= 3.4.6)
49
+ rack (>= 1.6.2, < 3)
50
+ rack-protection
51
+ omniauth-oauth2 (1.7.1)
52
+ oauth2 (~> 1.4)
53
+ omniauth (>= 1.9, < 3)
54
+ parallel (1.21.0)
55
+ parser (3.0.2.0)
56
+ ast (~> 2.4.1)
57
+ pry (0.14.1)
58
+ coderay (~> 1.1)
59
+ method_source (~> 1.0)
60
+ rack (2.2.3)
61
+ rack-protection (2.1.0)
62
+ rack
63
+ rainbow (3.0.0)
64
+ rake (13.0.6)
65
+ regexp_parser (2.1.1)
66
+ rexml (3.2.5)
67
+ rspec (3.10.0)
68
+ rspec-core (~> 3.10.0)
69
+ rspec-expectations (~> 3.10.0)
70
+ rspec-mocks (~> 3.10.0)
71
+ rspec-core (3.10.1)
72
+ rspec-support (~> 3.10.0)
73
+ rspec-expectations (3.10.1)
74
+ diff-lcs (>= 1.2.0, < 2.0)
75
+ rspec-support (~> 3.10.0)
76
+ rspec-mocks (3.10.2)
77
+ diff-lcs (>= 1.2.0, < 2.0)
78
+ rspec-support (~> 3.10.0)
79
+ rspec-support (3.10.2)
80
+ rubocop (1.22.3)
81
+ parallel (~> 1.10)
82
+ parser (>= 3.0.0.0)
83
+ rainbow (>= 2.2.2, < 4.0)
84
+ regexp_parser (>= 1.8, < 3.0)
85
+ rexml
86
+ rubocop-ast (>= 1.12.0, < 2.0)
87
+ ruby-progressbar (~> 1.7)
88
+ unicode-display_width (>= 1.4.0, < 3.0)
89
+ rubocop-ast (1.12.0)
90
+ parser (>= 3.0.1.1)
91
+ rubocop-performance (1.11.5)
92
+ rubocop (>= 1.7.0, < 2.0)
93
+ rubocop-ast (>= 0.4.0)
94
+ ruby-progressbar (1.11.0)
95
+ ruby2_keywords (0.0.5)
96
+ simplecov (0.21.2)
97
+ docile (~> 1.1)
98
+ simplecov-html (~> 0.11)
99
+ simplecov_json_formatter (~> 0.1)
100
+ simplecov-html (0.12.3)
101
+ simplecov_json_formatter (0.1.3)
102
+ standard (1.4.0)
103
+ rubocop (= 1.22.3)
104
+ rubocop-performance (= 1.11.5)
105
+ unicode-display_width (2.1.0)
106
+
107
+ PLATFORMS
108
+ ruby
109
+
110
+ DEPENDENCIES
111
+ awesome_print
112
+ bundler
113
+ omniauth-eve_online-sso!
114
+ pry
115
+ rake
116
+ rspec
117
+ simplecov
118
+ standard
119
+
120
+ BUNDLED WITH
121
+ 2.2.29
data/LICENSE.txt CHANGED
@@ -1,6 +1,6 @@
1
1
  The MIT License (MIT)
2
2
 
3
- Copyright (c) 2016-2017 Igor Zubkov
3
+ Copyright (c) 2016-2020 Igor Zubkov
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
data/README.md CHANGED
@@ -1,5 +1,8 @@
1
1
  # OmniAuth EveOnline SSO
2
2
 
3
+ [![Gem Version](https://img.shields.io/gem/v/omniauth-eve_online-sso.svg)](https://rubygems.org/gems/omniauth-eve_online-sso)
4
+ [![security](https://hakiri.io/github/evemonk/omniauth-eve_online-sso/master.svg)](https://hakiri.io/github/evemonk/omniauth-eve_online-sso/main)
5
+
3
6
  Eve Online OAuth2 Strategy for OmniAuth.
4
7
 
5
8
  ## Installation
@@ -12,11 +15,15 @@ gem 'omniauth-eve_online-sso'
12
15
 
13
16
  And then execute:
14
17
 
15
- $ bundle
18
+ ```shell
19
+ bundle
20
+ ```
16
21
 
17
22
  Or install it yourself as:
18
23
 
19
- $ gem install omniauth-eve_online-sso
24
+ ```shell
25
+ gem install omniauth-eve_online-sso
26
+ ```
20
27
 
21
28
  ## Usage
22
29
 
@@ -24,111 +31,89 @@ Configure omniauth for use new strategy:
24
31
 
25
32
  ```ruby
26
33
  Rails.application.config.middleware.use OmniAuth::Builder do
27
- provider :eve_online_sso, ENV['EVE_ONLINE_SSO_CLIENT_ID'], ENV['EVE_ONLINE_SSO_SECRET_KEY'], scope: 'publicData'
34
+ provider :eve_online_sso,
35
+ ENV["EVE_ONLINE_SSO_CLIENT_ID"],
36
+ ENV["EVE_ONLINE_SSO_SECRET_KEY"],
37
+ scope: "publicData"
28
38
  end
29
39
  ```
30
40
 
31
- ## Scopes
32
-
33
- Scopes can be one of two types. Old CREST or new ESI. ESI is recommended for all new apps.
41
+ Note: scopes should be separated by spaces. E.g. `'esi-fleets.read_fleet.v1 esi-fleets.write_fleet.v1'`.
34
42
 
35
- ### ESI
43
+ ## Scopes
36
44
 
37
45
  |Scope|Description|
38
46
  |-----|-----------|
39
- |esi-assets.read_assets.v1|Allows reading a list of assets that the character owns.|
40
- |esi-bookmarks.read_character_bookmarks.v1|Allows reading of a character's bookmarks and bookmark folders.|
41
- |esi-calendar.read_calendar_events.v1|Allows reading a character's calendar, including corporation events.|
42
- |esi-calendar.respond_calendar_events.v1|Allows updating of a character's calendar event responses.|
43
- |esi-characters.read_agents_research.v1|Allows reading a character's research status with agents.|
44
- |esi-characters.read_blueprints.v1|Allows reading a character's blueprints.|
45
- |esi-characters.read_chat_channels.v1|Allows reading a character's chat channels.|
46
- |esi-characters.read_contacts.v1|Allows reading of a characters contacts list, and calculation of CSPA charges.|
47
- |esi-characters.read_corporation_roles.v1|Allows reading the character's corporation roles.|
48
- |esi-characters.read_fatigue.v1|Allows reading a character's jump fatigue information.|
49
- |esi-characters.read_loyalty.v1|Allows reading a character's loyalty points.|
50
- |esi-characters.read_medals.v1|Allows reading a character's medals.|
51
- |esi-characters.read_opportunities.v1|Allows reading opportunities of a character.|
52
- |esi-characters.read_standings.v1|Allows reading a character's standings.|
53
- |esi-characters.write_contacts.v1|Allows management of contacts.|
47
+ |publicData|Allows access to public data.|
48
+ |esi-alliances.read_contacts.v1|Allows reading of an alliance's contact list and standings|
49
+ |esi-assets.read_assets.v1|Allows reading a list of assets that the character owns|
50
+ |esi-assets.read_corporation_assets.v1|Allows reading of a character's corporation's assets, if the character has roles to do so.|
51
+ |esi-bookmarks.read_character_bookmarks.v1|Allows reading of a character's bookmarks and bookmark folders|
52
+ |esi-bookmarks.read_corporation_bookmarks.v1|Allows reading of a corporations's bookmarks and bookmark folders|
53
+ |esi-calendar.read_calendar_events.v1|Allows reading a character's calendar, including corporation events|
54
+ |esi-calendar.respond_calendar_events.v1|Allows updating of a character's calendar event responses|
55
+ |esi-characters.read_agents_research.v1|Allows reading a character's research status with agents|
56
+ |esi-characters.read_blueprints.v1|Allows reading a character's blueprints|
57
+ |esi-characters.read_chat_channels.v1|Allows reading a character's chat channels|
58
+ |esi-characters.read_contacts.v1|Allows reading of a characters contacts list, and calculation of CSPA charges|
59
+ |esi-characters.read_corporation_roles.v1|Allows reading the character's corporation roles|
60
+ |esi-characters.read_fatigue.v1|Allows reading a character's jump fatigue information|
61
+ |esi-characters.read_fw_stats.v1|Allows reading of a character's faction warfare statistics|
62
+ |esi-characters.read_loyalty.v1|Allows reading a character's loyalty points|
63
+ |esi-characters.read_medals.v1|Allows reading a character's medals|
64
+ |esi-characters.read_notifications.v1|Allows reading a character's pending contact notifications|
65
+ |esi-characters.read_opportunities.v1|Allows reading opportunities of a character|
66
+ |esi-characters.read_standings.v1|Allows reading a character's standings|
67
+ |esi-characters.read_titles.v1|Allows reading titles given to a character|
68
+ |esi-characters.write_contacts.v1|Allows management of contacts|
69
+ |esi-characterstats.read.v1|Allows reading a characters aggregated statistics from the past year.|
54
70
  |esi-clones.read_clones.v1|Allows reading the locations of a character's jump clones and their implants.|
55
- |esi-clones.read_implants.v1|Allows reading a character's active clone's implants.|
56
- |esi-contracts.read_character_contracts.v1|Allows reading a character's contracts.|
57
- |esi-corporations.read_corporation_membership.v1|Allows reading a list of the ID's and roles of a character's fellow corporation members.|
58
- |esi-corporations.read_structures.v1|Allows reading a character's corporation's structure information.|
59
- |esi-corporations.write_structures.v1|Allows updating a character's corporation's structure information.|
60
- |esi-fittings.read_fittings.v1|Allows reading information about fittings.|
61
- |esi-fittings.write_fittings.v1|Allows manipulating fittings.|
62
- |esi-fleets.read_fleet.v1|Allows reading information about fleets.|
63
- |esi-fleets.write_fleet.v1|Allows manipulating fleets.|
64
- |esi-industry.read_character_jobs.v1|Allows reading a character's industry jobs.|
65
- |esi-killmails.read_corporation_killmails.v1|Allows reading of a corporation's kills and losses.|
66
- |esi-killmails.read_killmails.v1|Allows reading of a character's kills and losses.|
67
- |esi-location.read_location.v1|Allows reading of a character's active ship location.|
68
- |esi-location.read_online.v1|Allows reading a character's online status.|
69
- |esi-location.read_ship_type.v1|Allows reading of a character's active ship class.|
71
+ |esi-clones.read_implants.v1|Allows reading a character's active clone's implants|
72
+ |esi-contracts.read_character_contracts.v1|Allows reading a character's contracts|
73
+ |esi-contracts.read_corporation_contracts.v1|Allows reading a corporation's contracts|
74
+ |esi-corporations.read_blueprints.v1|Allows reading a corporation's blueprints|
75
+ |esi-corporations.read_contacts.v1|Allows reading of a character's corporation's contacts, if the character has roles to do so.|
76
+ |esi-corporations.read_container_logs.v1|Allows reading of a corporation's ALSC logs|
77
+ |esi-corporations.read_corporation_membership.v1|Allows reading a list of the ID's and roles of a character's fellow corporation members|
78
+ |esi-corporations.read_divisions.v1|Allows reading of a character's corporation's division names, if the character has roles to do so.|
79
+ |esi-corporations.read_facilities.v1|Allows reading a corporation's facilities|
80
+ |esi-corporations.read_fw_stats.v1|Allows reading of a corporation's faction warfare statistics|
81
+ |esi-corporations.read_medals.v1|Allows reading medals created and issued by a corporation|
82
+ |esi-corporations.read_standings.v1|Allows reading a corporation's standings|
83
+ |esi-corporations.read_starbases.v1|Allows reading of a character's corporation's starbase (POS) information, if the character has roles to do so.|
84
+ |esi-corporations.read_structures.v1|Allows reading a character's corporation's structure information|
85
+ |esi-corporations.read_titles.v1|Allows reading of a character's corporation's titles, if the character has roles to do so.|
86
+ |esi-corporations.track_members.v1|Allows tracking members' activities in a corporation|
87
+ |esi-fittings.read_fittings.v1|Allows reading information about fittings|
88
+ |esi-fittings.write_fittings.v1|Allows manipulating fittings|
89
+ |esi-fleets.read_fleet.v1|Allows reading information about fleets|
90
+ |esi-fleets.write_fleet.v1|Allows manipulating fleets|
91
+ |esi-industry.read_character_jobs.v1|Allows reading a character's industry jobs|
92
+ |esi-industry.read_character_mining.v1|Allows reading a character's personal mining activity|
93
+ |esi-industry.read_corporation_jobs.v1|Allows reading of a character's corporation's industry jobs, if the character has roles to do so.|
94
+ |esi-industry.read_corporation_mining.v1|Allows reading and observing a corporation's mining activity|
95
+ |esi-killmails.read_corporation_killmails.v1|Allows reading of a corporation's kills and losses|
96
+ |esi-killmails.read_killmails.v1|Allows reading of a character's kills and losses|
97
+ |esi-location.read_location.v1|Allows reading of a character's active ship location|
98
+ |esi-location.read_online.v1|Allows reading a character's online status|
99
+ |esi-location.read_ship_type.v1|Allows reading of a character's active ship class|
70
100
  |esi-mail.organize_mail.v1|Allows updating the character's mail labels and unread status. Also allows deleting of the character's mail.|
71
101
  |esi-mail.read_mail.v1|Allows reading of the character's inbox and mails.|
72
102
  |esi-mail.send_mail.v1|Allows sending of mail on the character's behalf.|
73
- |esi-markets.read_character_orders.v1|Allows reading a character's market orders.|
74
- |esi-markets.structure_markets.v1|Allows reading market data from a structure, if the user has market access to that structure.|
75
- |esi-planets.manage_planets.v1|Allows reading a list of a characters planetary colonies, and the details of those colonies.|
103
+ |esi-markets.read_character_orders.v1|Allows reading a character's market orders|
104
+ |esi-markets.read_corporation_orders.v1|Allows reading of a character's corporation's market orders, if the character has roles to do so.|
105
+ |esi-markets.structure_markets.v1|Allows reading market data from a structure, if the user has market access to that structure|
106
+ |esi-planets.manage_planets.v1|Allows reading a list of a characters planetary colonies, and the details of those colonies|
107
+ |esi-planets.read_customs_offices.v1|Allow reading of corporation owned customs offices|
76
108
  |esi-search.search_structures.v1|Allows searching over all structures that a character can see in the structure browser.|
77
109
  |esi-skills.read_skillqueue.v1|Allows reading of a character's currently training skill queue.|
78
110
  |esi-skills.read_skills.v1|Allows reading of a character's currently known skills.|
79
- |esi-ui.open_window.v1|Allows open window in game client remotely.|
80
- |esi-ui.write_waypoint.v1|Allows manipulating waypoints in game client remotely.|
111
+ |esi-ui.open_window.v1|Allows open window in game client remotely|
112
+ |esi-ui.write_waypoint.v1|Allows manipulating waypoints in game client remotely|
81
113
  |esi-universe.read_structures.v1|Allows querying the location and type of structures that the character has docking access at.|
82
114
  |esi-wallet.read_character_wallet.v1|Allows reading of a character's wallet, journal and transaction history.|
83
-
84
- ### CREST
85
-
86
- |Scope|Description|
87
- |-----|-----------|
88
- |characterAccountRead|Read your account subscription status.|
89
- |characterAssetsRead|Read your asset list.|
90
- |characterBookmarksRead|List your bookmarks and their coordinates.|
91
- |characterCalendarRead|Read your calendar events and attendees.|
92
- |characterChatChannelsRead|List chat channels you own or operate.|
93
- |characterClonesRead|List your jump clones, implants, attributes, and jump fatigue timer.|
94
- |characterContactsRead|Allows access to reading your characters contacts.|
95
- |characterContactsWrite|Allows applications to add, modify, and delete contacts for your character.|
96
- |characterContractsRead|Read your contracts.|
97
- |characterFactionalWarfareRead|Read your factional warfare statistics.|
98
- |characterFittingsRead|Allows an application to view all of your character's saved fits.|
99
- |characterFittingsWrite|Allows an application to create and delete the saved fits for your character.|
100
- |characterIndustryJobsRead|List your industry jobs.|
101
- |characterKillsRead|Read your kill mails.|
102
- |characterLocationRead|Allows an application to read your characters real time location in EVE.|
103
- |characterLoyaltyPointsRead|List loyalty points your character has for the different corporations.|
104
- |characterMailRead|Read your EVE Mail.|
105
- |characterMarketOrdersRead|Read your market orders.|
106
- |characterMedalsRead|List your public and private medals.|
107
- |characterNavigationWrite|Allows an application to set your ships autopilot destination.|
108
- |characterNotificationsRead|Receive in-game notifications.|
109
- |characterOpportunitiesRead|List the opportunities your character has completed.|
110
- |characterResearchRead|List your research agents working for you and research progress.|
111
- |characterSkillsRead|Read your skills and skill queue.|
112
- |characterStatsRead|Yearly aggregated stats about your character.|
113
- |characterWalletRead|Read your wallet status, transaction, and journal history.|
114
- |corporationAssetsRead|Read your corporation's asset list.|
115
- |corporationBookmarksRead|List your corporation's bookmarks and their coordinates.|
116
- |corporationContactsRead|Read your corporation’s contact list and standings.|
117
- |corporationContractsRead|List your corporation's contracts.|
118
- |corporationFactionalWarfareRead|Read your corporation's factional warfare statistics.|
119
- |corporationIndustryJobsRead|List your corporation's industry jobs.|
120
- |corporationKillsRead|Read your corporation's kill mails.|
121
- |corporationMarketOrdersRead|List your corporation's market orders.|
122
- |corporationMedalsRead|List your corporation's issued medals.|
123
- |corporationMembersRead|List your corporation's members, their titles, and roles.|
124
- |corporationShareholdersRead|List your corporation's shareholders and their shares.|
125
- |corporationStructuresRead|List your corporation's structures, outposts, and starbases.|
126
- |corporationWalletRead|Read your corporation's wallet status, transaction, and journal history.|
127
- |fleetRead|Allows real time reading of your fleet information (members, ship types, etc.) if you're the boss of the fleet.|
128
- |fleetWrite|Allows the ability to invite, kick, and update fleet information if you're the boss of the fleet.|
129
- |publicData|Allows access to public data.|
130
- |remoteClientUI|Allows applications to control the UI of your EVE Online client.|
131
- |structureVulnUpdate|Allows updating your structures' vulnerability timers.|
115
+ |esi-wallet.read_corporation_wallet.v1|EVE Mobile legacy scope|
116
+ |esi-wallet.read_corporation_wallets.v1|Allows reading of a character's corporation's wallets, journal and transaction history, if the character has roles to do so.|
132
117
 
133
118
  ## Development
134
119
 
@@ -138,7 +123,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
138
123
 
139
124
  ## Contributing
140
125
 
141
- Bug reports and pull requests are welcome on GitHub at https://github.com/biow0lf/omniauth-eve_online-sso.
126
+ Bug reports and pull requests are welcome on GitHub at <https://github.com/evemonk/omniauth-eve_online-sso>.
142
127
 
143
128
  ## License
144
129
 
data/Rakefile CHANGED
@@ -1,5 +1,7 @@
1
- require 'bundler/gem_tasks'
2
- require 'rspec/core/rake_task'
1
+ # frozen_string_literal: true
2
+
3
+ require "bundler/gem_tasks"
4
+ require "rspec/core/rake_task"
3
5
 
4
6
  RSpec::Core::RakeTask.new(:spec)
5
7
 
data/bin/console CHANGED
@@ -1,4 +1,5 @@
1
1
  #!/usr/bin/env ruby
2
+ # frozen_string_literal: true
2
3
 
3
4
  require 'bundler/setup'
4
5
  require 'omniauth-eve_online-sso'
@@ -1,7 +1,9 @@
1
+ # frozen_string_literal: true
2
+
1
3
  module Omniauth
2
4
  module EveOnline
3
5
  module SSO
4
- VERSION = '0.1.0'.freeze
6
+ VERSION = "0.5.0"
5
7
  end
6
8
  end
7
9
  end
@@ -1,24 +1,28 @@
1
- require 'omniauth-oauth2'
1
+ # frozen_string_literal: true
2
+
3
+ require "omniauth-oauth2"
4
+ require "jwt"
2
5
 
3
6
  module OmniAuth
4
7
  module Strategies
5
8
  class EveOnlineSso < OmniAuth::Strategies::OAuth2
6
- option :name, 'eve_online_sso'
9
+ option :name, "eve_online_sso"
7
10
 
8
- option :client_options, authorize_path: '/oauth/authorize',
9
- site: 'https://login.eveonline.com/',
10
- proxy: ENV['http_proxy'] ? URI(ENV['http_proxy']) : nil
11
+ option :client_options,
12
+ authorize_url: "/v2/oauth/authorize",
13
+ token_url: "/v2/oauth/token",
14
+ site: "https://login.eveonline.com/"
11
15
 
12
- uid { raw_info['CharacterID'] }
16
+ uid { raw_info["character_id"] }
13
17
 
14
18
  info do
15
19
  {
16
- name: raw_info['CharacterName'],
17
- character_id: raw_info['CharacterID'],
18
- expires_on: raw_info['ExpiresOn'],
19
- scopes: raw_info['Scopes'],
20
- token_type: raw_info['TokenType'],
21
- character_owner_hash: raw_info['CharacterOwnerHash']
20
+ name: raw_info["name"],
21
+ character_id: raw_info["character_id"],
22
+ expires_on: raw_info["expires_on"],
23
+ scopes: raw_info["scopes"],
24
+ token_type: raw_info["token_type"],
25
+ character_owner_hash: raw_info["owner"]
22
26
  }
23
27
  end
24
28
 
@@ -29,7 +33,13 @@ module OmniAuth
29
33
  end
30
34
 
31
35
  def raw_info
32
- @raw_info ||= access_token.get('/oauth/verify').parsed
36
+ @raw_info ||= JWT.decode(access_token.token, nil, false)
37
+ .find { |element| element.keys.include?("scp") }.tap do |hash|
38
+ hash["character_id"] = hash["sub"].split(":")[-1]
39
+ hash["scopes"] = [*hash["scp"]].join(" ")
40
+ hash["token_type"] = hash["sub"].split(":")[0].capitalize
41
+ hash["expires_on"] = hash["exp"]
42
+ end
33
43
  end
34
44
  end
35
45
  end
@@ -1,2 +1,4 @@
1
- require 'omniauth/eve_online/sso/version'
2
- require 'omniauth/strategies/eve_online_sso'
1
+ # frozen_string_literal: true
2
+
3
+ require "omniauth/eve_online/sso/version"
4
+ require "omniauth/strategies/eve_online_sso"
@@ -1,28 +1,30 @@
1
- lib = File.expand_path('../lib', __FILE__)
1
+ # frozen_string_literal: true
2
+
3
+ lib = File.expand_path("../lib", __FILE__)
2
4
  $LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
3
- require 'omniauth/eve_online/sso/version'
5
+ require "omniauth/eve_online/sso/version"
4
6
 
5
7
  Gem::Specification.new do |spec|
6
- spec.name = 'omniauth-eve_online-sso'
7
- spec.version = Omniauth::EveOnline::SSO::VERSION
8
- spec.authors = ['Igor Zubkov']
9
- spec.email = ['igor.zubkov@gmail.com']
8
+ spec.name = "omniauth-eve_online-sso"
9
+ spec.version = Omniauth::EveOnline::SSO::VERSION
10
+ spec.authors = ["Igor Zubkov"]
11
+ spec.email = ["igor.zubkov@gmail.com"]
10
12
 
11
- spec.summary = 'OmniAuth strategy for EveOnline SSO'
12
- spec.description = 'OmniAuth strategy for EveOnline SSO'
13
- spec.homepage = 'https://github.com/biow0lf/omniauth-eve_online-sso'
14
- spec.license = 'MIT'
13
+ spec.summary = "OmniAuth strategy for EveOnline SSO"
14
+ spec.description = "OmniAuth strategy for EveOnline SSO"
15
+ spec.homepage = "https://github.com/evemonk/omniauth-eve_online-sso"
16
+ spec.license = "MIT"
15
17
 
16
- spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
17
- spec.require_paths = ['lib']
18
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test|spec|features)/}) }
19
+ spec.require_paths = ["lib"]
18
20
 
19
- spec.required_ruby_version = '>= 1.9.3'
21
+ spec.required_ruby_version = ">= 2.6"
20
22
 
21
- spec.add_dependency 'omniauth-oauth2'
23
+ spec.add_dependency "omniauth-oauth2"
24
+ spec.add_dependency "jwt"
22
25
 
23
- spec.add_development_dependency 'bundler'
24
- spec.add_development_dependency 'rake'
25
- spec.add_development_dependency 'rspec'
26
- spec.add_development_dependency 'simplecov'
27
- spec.add_development_dependency 'codeclimate-test-reporter'
26
+ spec.add_development_dependency "bundler"
27
+ spec.add_development_dependency "rake"
28
+ spec.add_development_dependency "rspec"
29
+ spec.add_development_dependency "simplecov"
28
30
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-eve_online-sso
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.5.0
5
5
  platform: ruby
6
6
  authors:
7
7
  - Igor Zubkov
8
- autorequire:
8
+ autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2017-08-21 00:00:00.000000000 Z
11
+ date: 2021-11-12 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2
@@ -25,13 +25,13 @@ dependencies:
25
25
  - !ruby/object:Gem::Version
26
26
  version: '0'
27
27
  - !ruby/object:Gem::Dependency
28
- name: bundler
28
+ name: jwt
29
29
  requirement: !ruby/object:Gem::Requirement
30
30
  requirements:
31
31
  - - ">="
32
32
  - !ruby/object:Gem::Version
33
33
  version: '0'
34
- type: :development
34
+ type: :runtime
35
35
  prerelease: false
36
36
  version_requirements: !ruby/object:Gem::Requirement
37
37
  requirements:
@@ -39,7 +39,7 @@ dependencies:
39
39
  - !ruby/object:Gem::Version
40
40
  version: '0'
41
41
  - !ruby/object:Gem::Dependency
42
- name: rake
42
+ name: bundler
43
43
  requirement: !ruby/object:Gem::Requirement
44
44
  requirements:
45
45
  - - ">="
@@ -53,7 +53,7 @@ dependencies:
53
53
  - !ruby/object:Gem::Version
54
54
  version: '0'
55
55
  - !ruby/object:Gem::Dependency
56
- name: rspec
56
+ name: rake
57
57
  requirement: !ruby/object:Gem::Requirement
58
58
  requirements:
59
59
  - - ">="
@@ -67,7 +67,7 @@ dependencies:
67
67
  - !ruby/object:Gem::Version
68
68
  version: '0'
69
69
  - !ruby/object:Gem::Dependency
70
- name: simplecov
70
+ name: rspec
71
71
  requirement: !ruby/object:Gem::Requirement
72
72
  requirements:
73
73
  - - ">="
@@ -81,7 +81,7 @@ dependencies:
81
81
  - !ruby/object:Gem::Version
82
82
  version: '0'
83
83
  - !ruby/object:Gem::Dependency
84
- name: codeclimate-test-reporter
84
+ name: simplecov
85
85
  requirement: !ruby/object:Gem::Requirement
86
86
  requirements:
87
87
  - - ">="
@@ -101,12 +101,19 @@ executables: []
101
101
  extensions: []
102
102
  extra_rdoc_files: []
103
103
  files:
104
+ - ".github/CODEOWNERS"
105
+ - ".github/FUNDING.yml"
106
+ - ".github/dependabot.yml"
107
+ - ".github/workflows/mdl.yml"
104
108
  - ".gitignore"
109
+ - ".mdlrc"
105
110
  - ".rspec"
106
111
  - ".rubocop.yml"
107
- - ".rubocop_todo.yml"
112
+ - ".ruby-version"
108
113
  - ".travis.yml"
114
+ - CHANGELOG.md
109
115
  - Gemfile
116
+ - Gemfile.lock
110
117
  - LICENSE.txt
111
118
  - README.md
112
119
  - Rakefile
@@ -116,11 +123,11 @@ files:
116
123
  - lib/omniauth/eve_online/sso/version.rb
117
124
  - lib/omniauth/strategies/eve_online_sso.rb
118
125
  - omniauth-eve_online-sso.gemspec
119
- homepage: https://github.com/biow0lf/omniauth-eve_online-sso
126
+ homepage: https://github.com/evemonk/omniauth-eve_online-sso
120
127
  licenses:
121
128
  - MIT
122
129
  metadata: {}
123
- post_install_message:
130
+ post_install_message:
124
131
  rdoc_options: []
125
132
  require_paths:
126
133
  - lib
@@ -128,16 +135,15 @@ required_ruby_version: !ruby/object:Gem::Requirement
128
135
  requirements:
129
136
  - - ">="
130
137
  - !ruby/object:Gem::Version
131
- version: 1.9.3
138
+ version: '2.6'
132
139
  required_rubygems_version: !ruby/object:Gem::Requirement
133
140
  requirements:
134
141
  - - ">="
135
142
  - !ruby/object:Gem::Version
136
143
  version: '0'
137
144
  requirements: []
138
- rubyforge_project:
139
- rubygems_version: 2.6.12
140
- signing_key:
145
+ rubygems_version: 3.2.31
146
+ signing_key:
141
147
  specification_version: 4
142
148
  summary: OmniAuth strategy for EveOnline SSO
143
149
  test_files: []
data/.rubocop_todo.yml DELETED
File without changes