omniauth-eve_o 0.1.3 → 0.1.4
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -3
- data/Gemfile.lock +22 -1
- data/README.md +38 -8
- data/lib/omniauth-eve_o/version.rb +1 -1
- data/lib/omniauth/eve_o/version.rb +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4bff70e7e896b513b0c7d172ef40686c2f7fcd6d
|
4
|
+
data.tar.gz: 32f64554be761f5cb92762875ac61e0c6f7b327b
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 53f1fff191683d1f3ee756061cd8e96f7e2b9465355f849a2f97d057ddb425236833502ddb3bbd77ae820d0cdb1f7384bb0069078c1445b9d0702d790e1c6c21
|
7
|
+
data.tar.gz: 5fe81ea83791144af1272ea6781b949676f87e87b87a05e3c0cbd59fe294fc8de6ccdcc1b0fd7c0ea509f763ace2c83a74ed00ac5e6e9111d83c4b3dfc0f598c
|
data/.gitignore
CHANGED
@@ -1,3 +1,2 @@
|
|
1
|
-
|
2
|
-
|
3
|
-
omniauth-eve_o-0.1.2.gem
|
1
|
+
/pkg
|
2
|
+
/coverage
|
data/Gemfile.lock
CHANGED
@@ -1,12 +1,33 @@
|
|
1
1
|
PATH
|
2
2
|
remote: .
|
3
3
|
specs:
|
4
|
-
omniauth-eve_o (0.1.
|
4
|
+
omniauth-eve_o (0.1.4)
|
5
|
+
omniauth-oauth2 (~> 1.5)
|
5
6
|
|
6
7
|
GEM
|
7
8
|
remote: https://rubygems.org/
|
8
9
|
specs:
|
9
10
|
diff-lcs (1.3)
|
11
|
+
faraday (0.12.2)
|
12
|
+
multipart-post (>= 1.2, < 3)
|
13
|
+
hashie (3.5.7)
|
14
|
+
jwt (1.5.6)
|
15
|
+
multi_json (1.13.1)
|
16
|
+
multi_xml (0.6.0)
|
17
|
+
multipart-post (2.0.0)
|
18
|
+
oauth2 (1.4.0)
|
19
|
+
faraday (>= 0.8, < 0.13)
|
20
|
+
jwt (~> 1.0)
|
21
|
+
multi_json (~> 1.3)
|
22
|
+
multi_xml (~> 0.5)
|
23
|
+
rack (>= 1.2, < 3)
|
24
|
+
omniauth (1.8.1)
|
25
|
+
hashie (>= 3.4.6, < 3.6.0)
|
26
|
+
rack (>= 1.6.2, < 3)
|
27
|
+
omniauth-oauth2 (1.5.0)
|
28
|
+
oauth2 (~> 1.1)
|
29
|
+
omniauth (~> 1.2)
|
30
|
+
rack (2.0.4)
|
10
31
|
rake (10.5.0)
|
11
32
|
rspec (3.7.0)
|
12
33
|
rspec-core (~> 3.7.0)
|
data/README.md
CHANGED
@@ -1,11 +1,6 @@
|
|
1
|
-
# Warning
|
2
|
-
Gem in currently in production. Please feel free to submit pull requests
|
3
|
-
|
4
1
|
# Omniauth::EveO
|
5
2
|
|
6
|
-
Welcome to
|
7
|
-
|
8
|
-
TODO: Delete this and the text above, and describe your gem
|
3
|
+
Welcome to OmniAuth-Eve_O! This is a strategy for using OmniAuth with Eve Online. See the most updated README on the [GitHub]('http://www.github.com/lnchambers/omniauth-eve_o') page.
|
9
4
|
|
10
5
|
## Installation
|
11
6
|
|
@@ -25,7 +20,42 @@ Or install it yourself as:
|
|
25
20
|
|
26
21
|
## Usage
|
27
22
|
|
28
|
-
|
23
|
+
Go to the [Eve Online Developer](https://developers.eveonline.com/) site and register your application
|
24
|
+
|
25
|
+
When registering your application, set the callback_url to `http://<your website domain>/auth/eve_o/callback`
|
26
|
+
|
27
|
+
### In Rails
|
28
|
+
|
29
|
+
Touch `/config/initializers/omniauth.rb`
|
30
|
+
|
31
|
+
Add the following code to omniauth.rb
|
32
|
+
|
33
|
+
```ruby
|
34
|
+
Rails.application.config.middleware.use OmniAuth::Builder do
|
35
|
+
provider :eve_o, 'client_id', 'client_secret'
|
36
|
+
end
|
37
|
+
```
|
38
|
+
|
39
|
+
Although scope is optional in Eve_O, it is recommended to have it set based on the permissions you set when you set up your application on the [Eve Online Developer](https://developers.eveonline.com/) site.
|
40
|
+
|
41
|
+
```ruby
|
42
|
+
Rails.application.config.middleware.use OmniAuth::Builder do
|
43
|
+
provider :eve_o, 'client_id', 'client_secret', scope: 'publicData structureVulnUpdate'
|
44
|
+
end
|
45
|
+
```
|
46
|
+
|
47
|
+
In your program, when users want to log in, redirect them to `auth/eve_o`. They will be directed to the Eve Online sign on and will follow the process.
|
48
|
+
|
49
|
+
The `auth_hash` returned should look something like this:
|
50
|
+
|
51
|
+
```ruby
|
52
|
+
{
|
53
|
+
"access_token":"uNEEh...a_WpiaA2",
|
54
|
+
"token_type":"Bearer",
|
55
|
+
"expires_in":1200,
|
56
|
+
"refresh_token":"gEy...fM0"
|
57
|
+
}
|
58
|
+
```
|
29
59
|
|
30
60
|
## Development
|
31
61
|
|
@@ -35,7 +65,7 @@ To install this gem onto your local machine, run `bundle exec rake install`. To
|
|
35
65
|
|
36
66
|
## Contributing
|
37
67
|
|
38
|
-
Bug reports and pull requests are welcome on GitHub at https://github.com/
|
68
|
+
Bug reports and pull requests are welcome on GitHub at https://github.com/lnchambers/omniauth-eve_o. This project is intended to be a safe, welcoming space for collaboration, and contributors are expected to adhere to the [Contributor Covenant](http://contributor-covenant.org) code of conduct.
|
39
69
|
|
40
70
|
## License
|
41
71
|
|