omniauth-fablabs 0.0.1
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 +7 -0
- data/.gitignore +5 -0
- data/.travis.yml +7 -0
- data/Gemfile +12 -0
- data/README.md +0 -0
- data/Rakefile +8 -0
- data/lib/omniauth-fablabs.rb +2 -0
- data/lib/omniauth-fablabs/version.rb +5 -0
- data/lib/omniauth/strategies/fablabs.rb +41 -0
- data/omniauth-fablabs.gemspec +22 -0
- metadata +81 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: efbc425a99c130a5bbd36c1d5a2706d9a1ca73df
|
4
|
+
data.tar.gz: f3f4deb89d1ccb90adea36f6c7dfcd1fcde7c60e
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 26e069b6e5c5d1336d6e7fc6c605e0092716eddb991cc0525aa411b6640efd6ca4abe91b5f0d6784ed4307d3d69ff72970c05f3e6d34b191c9bf2c90c411fa89
|
7
|
+
data.tar.gz: 2da5bc7c1ada8ec86ed8eea7b25af176e0403f22531c5065e81ed2b64ad986f673df4939547bc2b2f6d19b522ffdf119f6bdf68ee49e90e6821ef28bc0cb0611
|
data/.travis.yml
ADDED
data/Gemfile
ADDED
data/README.md
ADDED
File without changes
|
data/Rakefile
ADDED
@@ -0,0 +1,41 @@
|
|
1
|
+
require 'omniauth-oauth2'
|
2
|
+
|
3
|
+
module OmniAuth
|
4
|
+
module Strategies
|
5
|
+
class Fablabs < OmniAuth::Strategies::OAuth2
|
6
|
+
# change the class name and the :name option to match your application name
|
7
|
+
option :name, "fablabs"
|
8
|
+
|
9
|
+
option :client_options, {
|
10
|
+
:site => "https://api.fablabs.io"
|
11
|
+
# :authorize_path => "/oauth/authorize"
|
12
|
+
}
|
13
|
+
|
14
|
+
uid { raw_info["user"]["id"] }
|
15
|
+
|
16
|
+
info do
|
17
|
+
{
|
18
|
+
:email => raw_info["user"]["email"],
|
19
|
+
:first_name => raw_info["user"]["first_name"],
|
20
|
+
:last_name => raw_info["user"]["last_name"],
|
21
|
+
:nickname => raw_info["user"]["username"],
|
22
|
+
:name => raw_info["user"]["username"],
|
23
|
+
:image => raw_info["user"]["avatar"],
|
24
|
+
:avatar => raw_info["user"]["avatar"]
|
25
|
+
# and anything else you want to return to your API consumers
|
26
|
+
}
|
27
|
+
end
|
28
|
+
|
29
|
+
extra do
|
30
|
+
{
|
31
|
+
'raw_info' => raw_info["user"]
|
32
|
+
}
|
33
|
+
end
|
34
|
+
|
35
|
+
def raw_info
|
36
|
+
@raw_info ||= access_token.get('/v0/me.json').parsed
|
37
|
+
end
|
38
|
+
|
39
|
+
end
|
40
|
+
end
|
41
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
$:.push File.expand_path("../lib", __FILE__)
|
3
|
+
require "omniauth-fablabs/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "omniauth-fablabs"
|
7
|
+
s.version = OmniAuth::Fablabs::VERSION
|
8
|
+
s.authors = ["Fiore Basile"]
|
9
|
+
s.email = ["fiore.basile@gmail.com"]
|
10
|
+
s.homepage = "https://github.com/fibasile/omniauth-fablabs"
|
11
|
+
s.description = %q{OmniAuth strategy for Fablabs.io}
|
12
|
+
s.summary = s.description
|
13
|
+
s.license = "MIT"
|
14
|
+
|
15
|
+
s.files = `git ls-files`.split("\n")
|
16
|
+
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
17
|
+
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
18
|
+
s.require_paths = ["lib"]
|
19
|
+
|
20
|
+
s.add_dependency 'omniauth-oauth2', '~> 1.3.1'
|
21
|
+
s.add_development_dependency 'bundler', '~> 1.0'
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,81 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: omniauth-fablabs
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Fiore Basile
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2016-01-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.3.1
|
20
|
+
type: :runtime
|
21
|
+
prerelease: false
|
22
|
+
version_requirements: !ruby/object:Gem::Requirement
|
23
|
+
requirements:
|
24
|
+
- - "~>"
|
25
|
+
- !ruby/object:Gem::Version
|
26
|
+
version: 1.3.1
|
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.0'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.0'
|
41
|
+
description: OmniAuth strategy for Fablabs.io
|
42
|
+
email:
|
43
|
+
- fiore.basile@gmail.com
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- ".gitignore"
|
49
|
+
- ".travis.yml"
|
50
|
+
- Gemfile
|
51
|
+
- README.md
|
52
|
+
- Rakefile
|
53
|
+
- lib/omniauth-fablabs.rb
|
54
|
+
- lib/omniauth-fablabs/version.rb
|
55
|
+
- lib/omniauth/strategies/fablabs.rb
|
56
|
+
- omniauth-fablabs.gemspec
|
57
|
+
homepage: https://github.com/fibasile/omniauth-fablabs
|
58
|
+
licenses:
|
59
|
+
- MIT
|
60
|
+
metadata: {}
|
61
|
+
post_install_message:
|
62
|
+
rdoc_options: []
|
63
|
+
require_paths:
|
64
|
+
- lib
|
65
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
66
|
+
requirements:
|
67
|
+
- - ">="
|
68
|
+
- !ruby/object:Gem::Version
|
69
|
+
version: '0'
|
70
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
71
|
+
requirements:
|
72
|
+
- - ">="
|
73
|
+
- !ruby/object:Gem::Version
|
74
|
+
version: '0'
|
75
|
+
requirements: []
|
76
|
+
rubyforge_project:
|
77
|
+
rubygems_version: 2.4.8
|
78
|
+
signing_key:
|
79
|
+
specification_version: 4
|
80
|
+
summary: OmniAuth strategy for Fablabs.io
|
81
|
+
test_files: []
|