omniauth-microvellum 0.1.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 +7 -0
- data/.gitignore +2 -0
- data/lib/omniauth/strategies/microvellum.rb +36 -0
- data/lib/omniauth-microvellum.rb +9 -0
- data/omniauth-microvellum.gemspec +18 -0
- metadata +89 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2713a077ce8a74f7488ec6accd23113f3d811618
|
4
|
+
data.tar.gz: 85ec194262a2693a6bce663936be36d1e748ac2c
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 52bfc1268de0628e2b86534c751f392c6e4b471e3e67dbf21ac4f8cd5a42949136d1afb8836ed18ba24a59d5682289d84163dc823fec3749987c03b1b49efce6
|
7
|
+
data.tar.gz: 071266a1e2cf35ec3d14ce04ab5366ea54eb8cde138373518c623d6842ddeae8e927778c8000cfffb8923731f7910d7a2778259a3ec49d57a53c82f3fb6a1b70
|
data/.gitignore
ADDED
@@ -0,0 +1,36 @@
|
|
1
|
+
require 'omniauth-oauth2'
|
2
|
+
require 'multi_json'
|
3
|
+
|
4
|
+
module OmniAuth
|
5
|
+
module Strategies
|
6
|
+
class Microvellum < OmniAuth::Strategies::OAuth2
|
7
|
+
#Option Storage / Request Phase
|
8
|
+
option :name, 'microvellum'
|
9
|
+
option :client_options, {
|
10
|
+
:site => 'http://localhost:50664',
|
11
|
+
:authorize_url => 'http://localhost:50664/authorize',
|
12
|
+
:token_url => 'http://localhost:50664/authenticate'
|
13
|
+
}
|
14
|
+
option :authorize_options, [:scope, :display]
|
15
|
+
|
16
|
+
#Callback Phase
|
17
|
+
uid {raw_info['LinkID'].to_s}
|
18
|
+
info do
|
19
|
+
{
|
20
|
+
:id => raw_info['LinkID'],
|
21
|
+
:name => [raw_info['FirstName'], raw_info['LastName']].map(&:strip).reject(&:empty?).join(' '),
|
22
|
+
:first_name => raw_info['FirstName'],
|
23
|
+
:last_name => raw_info['LastName'],
|
24
|
+
:email => raw_info['EmailDefault'],
|
25
|
+
:image => raw_info['ProfileImageBytes']
|
26
|
+
}
|
27
|
+
end
|
28
|
+
extra do
|
29
|
+
{ :raw_info => raw_info }
|
30
|
+
end
|
31
|
+
def raw_info
|
32
|
+
@raw_info ||= MultiJson.load(access_token.get('').body)['users'][0]['user']
|
33
|
+
end
|
34
|
+
end #class Microvellum
|
35
|
+
end #module Strategies
|
36
|
+
end #Module OmniAuth
|
@@ -0,0 +1,18 @@
|
|
1
|
+
Gem::Specification.new do |gem|
|
2
|
+
gem.add_dependency 'omniauth', '~> 1.0'
|
3
|
+
gem.add_dependency 'omniauth-oauth2', '~> 1.1'
|
4
|
+
gem.add_dependency 'multi_json'
|
5
|
+
|
6
|
+
gem.authors = ["Marvin Hinkley"]
|
7
|
+
gem.email = ["hinkley.marvin@gmail.com"]
|
8
|
+
gem.description = %q{Unofficial Microvellum strategy for OmniAuth 1.0}
|
9
|
+
gem.summary = %q{Unofficial Microvellum strategy for OmniAuth 1.0}
|
10
|
+
gem.homepage = "https://github.com/marvin-hinkley/omniauth-microvellum"
|
11
|
+
|
12
|
+
gem.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
|
13
|
+
gem.files = `git ls-files`.split("\n")
|
14
|
+
gem.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
|
15
|
+
gem.name = "omniauth-microvellum"
|
16
|
+
gem.require_paths = ["lib"]
|
17
|
+
gem.version = "0.1.0"
|
18
|
+
end
|
metadata
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: omniauth-microvellum
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Marvin Hinkley
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-06-09 00:00:00.000000000 Z
|
12
|
+
dependencies:
|
13
|
+
- !ruby/object:Gem::Dependency
|
14
|
+
name: omniauth
|
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: omniauth-oauth2
|
29
|
+
requirement: !ruby/object:Gem::Requirement
|
30
|
+
requirements:
|
31
|
+
- - "~>"
|
32
|
+
- !ruby/object:Gem::Version
|
33
|
+
version: '1.1'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.1'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: multi_json
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - ">="
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :runtime
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - ">="
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: Unofficial Microvellum strategy for OmniAuth 1.0
|
56
|
+
email:
|
57
|
+
- hinkley.marvin@gmail.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- lib/omniauth-microvellum.rb
|
64
|
+
- lib/omniauth/strategies/microvellum.rb
|
65
|
+
- omniauth-microvellum.gemspec
|
66
|
+
homepage: https://github.com/marvin-hinkley/omniauth-microvellum
|
67
|
+
licenses: []
|
68
|
+
metadata: {}
|
69
|
+
post_install_message:
|
70
|
+
rdoc_options: []
|
71
|
+
require_paths:
|
72
|
+
- lib
|
73
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
74
|
+
requirements:
|
75
|
+
- - ">="
|
76
|
+
- !ruby/object:Gem::Version
|
77
|
+
version: '0'
|
78
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
79
|
+
requirements:
|
80
|
+
- - ">="
|
81
|
+
- !ruby/object:Gem::Version
|
82
|
+
version: '0'
|
83
|
+
requirements: []
|
84
|
+
rubyforge_project:
|
85
|
+
rubygems_version: 2.2.2
|
86
|
+
signing_key:
|
87
|
+
specification_version: 4
|
88
|
+
summary: Unofficial Microvellum strategy for OmniAuth 1.0
|
89
|
+
test_files: []
|