omniauth-crest 1.1.0 → 1.2.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 +4 -4
- data/README.md +95 -0
- data/lib/omniauth-crest/version.rb +1 -1
- data/lib/omniauth/strategies/crest.rb +12 -0
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: bbd4a5b224ce5cd27925fc3b0e62fe0757505951
|
4
|
+
data.tar.gz: 2af90c1dd9aa2d8e673742c9c6467ed9761937d5
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 968beaeba5e09348dedb97fde4ed4334313389c2feb808a3e3d7cb1f06c63ff88cae7588884f29437db2706a6180022dd43e32bbe9bab9c551a76807c076c360
|
7
|
+
data.tar.gz: 6c9b3d99a165a8a694f98ba86eed7001734777a2aa92688aaabf5a593406054f7ee08f629f12fb25c7ec5c14496a327ab86734ede4b708cd3265fb53091af5d5
|
data/README.md
CHANGED
@@ -65,6 +65,101 @@ Put in your Client ID and Secret Key of course. You can get them from https://de
|
|
65
65
|
|
66
66
|
For more information on OmniAuth see [the OmniAuth Wiki](https://github.com/intridea/omniauth/wiki).
|
67
67
|
|
68
|
+
## Scopes & Authenticated CREST
|
69
|
+
|
70
|
+
If you wish to define app-wide scopes for authenticated CREST, add a scope
|
71
|
+
parameter to the middleware:
|
72
|
+
|
73
|
+
```ruby
|
74
|
+
# Rails:
|
75
|
+
# config/initializers/omniauth.rb
|
76
|
+
Rails.application.config.middleware.use OmniAuth::Builder do
|
77
|
+
provider :crest, 'client_id', 'secret_key',
|
78
|
+
scope: 'publicData characterLocationRead'
|
79
|
+
end
|
80
|
+
|
81
|
+
# OR
|
82
|
+
|
83
|
+
# Rack
|
84
|
+
use OmniAuth::Builder do
|
85
|
+
provider :crest, 'client_id', 'secret_key',
|
86
|
+
scope: 'publicData characterLocationRead'
|
87
|
+
end
|
88
|
+
```
|
89
|
+
|
90
|
+
### Possible Scopes
|
91
|
+
|
92
|
+
As of `2016-05-12`:
|
93
|
+
|
94
|
+
* __characterAccountRead__: Read your account subscription status.
|
95
|
+
* __characterAssetsRead__: Read your asset list.
|
96
|
+
* __characterBookmarksRead__: List your bookmarks and their coordinates.
|
97
|
+
* __characterCalendarRead__: Read your calendar events and attendees.
|
98
|
+
* __characterChatChannelsRead__: List chat channels you own or operate.
|
99
|
+
* __characterClonesRead__: List your jump clones, implants, attributes, and jump
|
100
|
+
fatigue timer.
|
101
|
+
* __characterContactsRead__: Allows access to reading your characters contacts.
|
102
|
+
* __characterContactsWrite__: Allows applications to add, modify, and delete
|
103
|
+
contacts for your character.
|
104
|
+
* __characterContractsRead__: Read your contracts.
|
105
|
+
* __characterFactionalWarfareRead__: Read your factional warfare statistics.
|
106
|
+
* __characterFittingsRead__: Allows an application to view all of your
|
107
|
+
character's saved fits.
|
108
|
+
* __characterFittingsWrite__: Allows an application to create and delete the
|
109
|
+
saved fits for your character.
|
110
|
+
* __characterIndustryJobsRead__: List your industry jobs.
|
111
|
+
* __characterKillsRead__: Read your kill mails.
|
112
|
+
* __characterLocationRead__: Allows an application to read your characters real
|
113
|
+
time location in EVE.
|
114
|
+
* __characterLoyaltyPointsRead__: List loyalty points your character has for the
|
115
|
+
different corporations.
|
116
|
+
* __characterMailRead__: Read your EVE Mail.
|
117
|
+
* __characterMarketOrdersRead__: Read your market orders.
|
118
|
+
* __characterMedalsRead__: List your public and private medals.
|
119
|
+
* __characterNavigationWrite__: Allows an application to set your ships
|
120
|
+
autopilot destination.
|
121
|
+
* __characterNotificationsRead__: Receive in-game notifications.
|
122
|
+
* __characterOpportunitiesRead__: List the opportunities your character has
|
123
|
+
completed.
|
124
|
+
* __characterResearchRead__: List your research agents working for you and
|
125
|
+
research progress.
|
126
|
+
* __characterSkillsRead__: Read your skills and skill queue.
|
127
|
+
* __characterStatsRead__: Yearly aggregated stats about your character.
|
128
|
+
* __characterWalletRead__: Read your wallet status, transaction, and journal
|
129
|
+
history.
|
130
|
+
* __corporationAssetRead__: Read your corporation's asset list.
|
131
|
+
* __corporationBookmarksRead__: List your corporation's bookmarks and their
|
132
|
+
coordinates.
|
133
|
+
* __corporationContractsRead__: List your corporation's contracts.
|
134
|
+
* __corporationFactionalWarfareRead__: Read your corporation's factional warfare
|
135
|
+
statistics.
|
136
|
+
* __corporationIndustryJobsRead__: List your corporation's industry jobs.
|
137
|
+
* __corporationKillsRead__: Read your corporation's kill mails.
|
138
|
+
* __corporationMarketOrdersRead__: List your corporation's market orders.
|
139
|
+
* __corporationMedalsRead__: List your corporation's issued medals.
|
140
|
+
* __corporationMembersRead__: List your corporation's members, their titles, and
|
141
|
+
roles.
|
142
|
+
* __corporationShareholdersRead__: List your corporation's shareholders and
|
143
|
+
their shares.
|
144
|
+
* __corporationStructuresRead__: List your corporation's structures, outposts,
|
145
|
+
and starbases.
|
146
|
+
* __corporationWalletRead__: Read your corporation's wallet status, transaction,
|
147
|
+
and journal history.
|
148
|
+
* __fleetRead__: Allows real time reading of your fleet information (members,
|
149
|
+
ship types, etc.) if you're the boss of the fleet.
|
150
|
+
* __fleetWrite__: Allows the ability to invite, kick, and update fleet
|
151
|
+
information if you're the boss of the fleet.
|
152
|
+
* __publicData__: Allows access to public data.
|
153
|
+
* __structureVulnUpdate__: Allows updating your structures' vulnerability
|
154
|
+
timers.
|
155
|
+
|
156
|
+
### Per-Request Options
|
157
|
+
|
158
|
+
If you want to define the scope on a per-request basis, you can pass it to the
|
159
|
+
OmniAuth request phase URL, for example:
|
160
|
+
`/auth/crest?scope=publicData+characterLocationRead`
|
161
|
+
|
162
|
+
|
68
163
|
## Questions
|
69
164
|
|
70
165
|
Ask me on Twitter at [@dratir](https://twitter.com/dratir).
|
@@ -29,6 +29,18 @@ module OmniAuth
|
|
29
29
|
def raw_info
|
30
30
|
@raw_info ||= access_token.get('/oauth/verify').parsed
|
31
31
|
end
|
32
|
+
|
33
|
+
def authorize_params
|
34
|
+
super.tap do |params|
|
35
|
+
%w[scope].each do |v|
|
36
|
+
if request.params[v]
|
37
|
+
params[v.to_sym] = request.params[v]
|
38
|
+
end
|
39
|
+
end
|
40
|
+
|
41
|
+
params[:scope] ||= ''
|
42
|
+
end
|
43
|
+
end
|
32
44
|
end
|
33
45
|
end
|
34
46
|
end
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: omniauth-crest
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.
|
4
|
+
version: 1.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Manuel Hutter
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date:
|
11
|
+
date: 2016-05-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: omniauth-oauth2
|
@@ -88,7 +88,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
88
88
|
version: '0'
|
89
89
|
requirements: []
|
90
90
|
rubyforge_project:
|
91
|
-
rubygems_version: 2.
|
91
|
+
rubygems_version: 2.5.1
|
92
92
|
signing_key:
|
93
93
|
specification_version: 4
|
94
94
|
summary: OmniAuth strategy for CREST/EVE Online
|