omniauth-crest 1.0.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +9 -0
- data/.travis.yml +4 -0
- data/Gemfile +4 -0
- data/LICENSE.txt +21 -0
- data/README.md +38 -0
- data/Rakefile +10 -0
- data/lib/omniauth-crest.rb +2 -0
- data/lib/omniauth-crest/version.rb +5 -0
- data/lib/omniauth/strategies/crest.rb +35 -0
- data/omniauth-crest.gemspec +27 -0
- metadata +138 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 6e5287149c4a334bb1b4824f7e7e1ac4ddc886cc
|
4
|
+
data.tar.gz: 7f85b86d9d456229fdf08087c14b32d4cdde78f8
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 62b898b0fd839d709336488f685fb3928ebea10dbfd89a76da9cb10f2466c787e1e309e8ead1cf682f943d5b4113ad54d89a1e2e04fdf971685217e29e7e2b30
|
7
|
+
data.tar.gz: c24485d2b908ef0d0246655f84eb83aeb6c274c09e160ee65a02c73a7e57126fae9916269e0cd2a3de625d60f85cf1ce710db8790f9ca515959e950c122a123a
|
data/.gitignore
ADDED
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/LICENSE.txt
ADDED
@@ -0,0 +1,21 @@
|
|
1
|
+
The MIT License (MIT)
|
2
|
+
|
3
|
+
Copyright (c) 2015 Manuel Hutter
|
4
|
+
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
7
|
+
in the Software without restriction, including without limitation the rights
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
10
|
+
furnished to do so, subject to the following conditions:
|
11
|
+
|
12
|
+
The above copyright notice and this permission notice shall be included in
|
13
|
+
all copies or substantial portions of the Software.
|
14
|
+
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
21
|
+
THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,38 @@
|
|
1
|
+
# OmniAuth::Crest
|
2
|
+
|
3
|
+
This gem provides the [EVE Online](http://www.eveonline.com)/CREST strategy for [OmniAuth](https://github.com/intridea/omniauth).
|
4
|
+
|
5
|
+
This allows your users to authenticate themselves via their EVE Online Account.
|
6
|
+
|
7
|
+
## Usage
|
8
|
+
|
9
|
+
Include the gem in your Gemfile:
|
10
|
+
|
11
|
+
```ruby
|
12
|
+
gem 'omniauth-crest'
|
13
|
+
```
|
14
|
+
|
15
|
+
Once the gem is installed, you need to add the middleware.
|
16
|
+
|
17
|
+
```ruby
|
18
|
+
# Rails:
|
19
|
+
# config/initializers/omniauth.rb
|
20
|
+
Rails.application.config.middleware.use OmniAuth::Builder do
|
21
|
+
provider :crest, 'client_id', 'secret_key'
|
22
|
+
end
|
23
|
+
|
24
|
+
# OR
|
25
|
+
|
26
|
+
# Rack
|
27
|
+
use OmniAuth::Builder do
|
28
|
+
provider :crest, 'client_id', 'secret_key'
|
29
|
+
end
|
30
|
+
```
|
31
|
+
|
32
|
+
Put in your Client ID and Secret Key of course. You can get them from https://developers.eveonline.com/applications
|
33
|
+
|
34
|
+
For more information on OmniAuth see [the OmniAuth Wiki](https://github.com/intridea/omniauth/wiki).
|
35
|
+
|
36
|
+
|
37
|
+
## COPYRIGHT NOTICE
|
38
|
+
EVE Online and the EVE logo are the registered trademarks of CCP hf. All rights are reserved worldwide. All other trademarks are the property of their respective owners. EVE Online, the EVE logo, EVE and all associated logos and designs are the intellectual property of CCP hf. All artwork, screenshots, characters, vehicles, storylines, world facts or other recognizable features of the intellectual property relating to these trademarks are likewise the intellectual property of CCP hf. CCP hf. has granted permission to Manuel Hutter to use EVE Online and all associated logos and designs for promotional and information purposes on its website but does not endorse, and is not in any way affiliated with, Manuel Hutter. CCP is in no way responsible for the content on or functioning of this website, nor can it be liable for any damage arising from the use of this website.
|
data/Rakefile
ADDED
@@ -0,0 +1,35 @@
|
|
1
|
+
require 'omniauth-oauth2'
|
2
|
+
|
3
|
+
module OmniAuth
|
4
|
+
module Strategies
|
5
|
+
class Crest < OmniAuth::Strategies::OAuth2
|
6
|
+
option :name, 'crest'
|
7
|
+
|
8
|
+
option :client_options, site: 'https://login.eveonline.com'
|
9
|
+
|
10
|
+
uid { raw_info['CharacterOwnerHash'] }
|
11
|
+
|
12
|
+
info do
|
13
|
+
{
|
14
|
+
name: raw_info['CharacterName'],
|
15
|
+
character_name: raw_info['CharacterName'],
|
16
|
+
character_id: raw_info['CharacterID'],
|
17
|
+
expires_on: raw_info['ExpiresOn'],
|
18
|
+
scopes: raw_info['Scopes'],
|
19
|
+
token_type: raw_info['TokenType'],
|
20
|
+
character_owner_hash: raw_info['CharacterOwnerHash']
|
21
|
+
}
|
22
|
+
end
|
23
|
+
|
24
|
+
extra do
|
25
|
+
{
|
26
|
+
raw_info: raw_info
|
27
|
+
}
|
28
|
+
end
|
29
|
+
|
30
|
+
def raw_info
|
31
|
+
@raw_info ||= access_token.get('/oauth/verify').parsed
|
32
|
+
end
|
33
|
+
end
|
34
|
+
end
|
35
|
+
end
|
@@ -0,0 +1,27 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'omniauth-crest/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |s|
|
7
|
+
s.name = 'omniauth-crest'
|
8
|
+
s.version = OmniAuth::Crest::VERSION
|
9
|
+
s.authors = ['Manuel Hutter']
|
10
|
+
s.email = ['git@mhutter.net']
|
11
|
+
|
12
|
+
s.summary = 'OmniAuth strategy for CREST/EVE Online'
|
13
|
+
s.description = 'OmniAuth strategy for CREST/EVE Online'
|
14
|
+
s.homepage = 'https://github.com/mhutter/omniauth-crest'
|
15
|
+
s.license = 'MIT'
|
16
|
+
|
17
|
+
s.files = `git ls-files -z`.split("\x0").reject { |f| f.match(%r{^(test)/}) }
|
18
|
+
s.executables = s.files.grep(%r{^exe/}) { |f| File.basename(f) }
|
19
|
+
s.require_paths = ['lib']
|
20
|
+
|
21
|
+
s.add_runtime_dependency 'omniauth-oauth2', '~> 1.0'
|
22
|
+
s.add_development_dependency 'bundler', '~> 1.10'
|
23
|
+
s.add_development_dependency 'rake', '~> 10.0'
|
24
|
+
s.add_development_dependency 'minitest'
|
25
|
+
s.add_development_dependency 'minitest-reporters'
|
26
|
+
s.add_development_dependency 'rack-test'
|
27
|
+
end
|
metadata
ADDED
@@ -0,0 +1,138 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: omniauth-crest
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Manuel Hutter
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-08-05 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: omniauth-oauth2
|
15
|
+
requirement: !ruby/object:Gem::Requirement
|
16
|
+
requirements:
|
17
|
+
- - "~>"
|
18
|
+
- !ruby/object:Gem::Version
|
19
|
+
version: '1.0'
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: '1.0'
|
27
|
+
- !ruby/object:Gem::Dependency
|
28
|
+
name: bundler
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.10'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.10'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '10.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '10.0'
|
55
|
+
- !ruby/object:Gem::Dependency
|
56
|
+
name: minitest
|
57
|
+
requirement: !ruby/object:Gem::Requirement
|
58
|
+
requirements:
|
59
|
+
- - ">="
|
60
|
+
- !ruby/object:Gem::Version
|
61
|
+
version: '0'
|
62
|
+
type: :development
|
63
|
+
prerelease: false
|
64
|
+
version_requirements: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: minitest-reporters
|
71
|
+
requirement: !ruby/object:Gem::Requirement
|
72
|
+
requirements:
|
73
|
+
- - ">="
|
74
|
+
- !ruby/object:Gem::Version
|
75
|
+
version: '0'
|
76
|
+
type: :development
|
77
|
+
prerelease: false
|
78
|
+
version_requirements: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
- !ruby/object:Gem::Dependency
|
84
|
+
name: rack-test
|
85
|
+
requirement: !ruby/object:Gem::Requirement
|
86
|
+
requirements:
|
87
|
+
- - ">="
|
88
|
+
- !ruby/object:Gem::Version
|
89
|
+
version: '0'
|
90
|
+
type: :development
|
91
|
+
prerelease: false
|
92
|
+
version_requirements: !ruby/object:Gem::Requirement
|
93
|
+
requirements:
|
94
|
+
- - ">="
|
95
|
+
- !ruby/object:Gem::Version
|
96
|
+
version: '0'
|
97
|
+
description: OmniAuth strategy for CREST/EVE Online
|
98
|
+
email:
|
99
|
+
- git@mhutter.net
|
100
|
+
executables: []
|
101
|
+
extensions: []
|
102
|
+
extra_rdoc_files: []
|
103
|
+
files:
|
104
|
+
- ".gitignore"
|
105
|
+
- ".travis.yml"
|
106
|
+
- Gemfile
|
107
|
+
- LICENSE.txt
|
108
|
+
- README.md
|
109
|
+
- Rakefile
|
110
|
+
- lib/omniauth-crest.rb
|
111
|
+
- lib/omniauth-crest/version.rb
|
112
|
+
- lib/omniauth/strategies/crest.rb
|
113
|
+
- omniauth-crest.gemspec
|
114
|
+
homepage: https://github.com/mhutter/omniauth-crest
|
115
|
+
licenses:
|
116
|
+
- MIT
|
117
|
+
metadata: {}
|
118
|
+
post_install_message:
|
119
|
+
rdoc_options: []
|
120
|
+
require_paths:
|
121
|
+
- lib
|
122
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
123
|
+
requirements:
|
124
|
+
- - ">="
|
125
|
+
- !ruby/object:Gem::Version
|
126
|
+
version: '0'
|
127
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
128
|
+
requirements:
|
129
|
+
- - ">="
|
130
|
+
- !ruby/object:Gem::Version
|
131
|
+
version: '0'
|
132
|
+
requirements: []
|
133
|
+
rubyforge_project:
|
134
|
+
rubygems_version: 2.4.5
|
135
|
+
signing_key:
|
136
|
+
specification_version: 4
|
137
|
+
summary: OmniAuth strategy for CREST/EVE Online
|
138
|
+
test_files: []
|