omniauth-frederick 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/lib/omniauth/frederick/version.rb +5 -0
- data/lib/omniauth/strategies/frederick.rb +31 -0
- data/lib/omniauth-frederick.rb +1 -0
- data/omniauth-frederick.gemspec +24 -0
- metadata +89 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 44c983079f8c4e5fca8d5e1206eef09d33006332
|
4
|
+
data.tar.gz: cd8d58a50b27a63a38b9aac358b54148529c39e4
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c1894769109ad8d61e2cf79f55a4c9c06901dcf8619a2e239f3828aca774e88393f1f767514741f2c1be0998583561405d1bceb04fd89c343ff0e30c72599146
|
7
|
+
data.tar.gz: 0a75e61b4e6996000307e96c4ddb62752929284e88a5d9124e32aacab416e4f9e8d511515c2efcec1d9d35098428fd1a38ca3dd78d2126be7aff4d276f50370b
|
@@ -0,0 +1,31 @@
|
|
1
|
+
require 'omniauth-oauth2'
|
2
|
+
|
3
|
+
module OmniAuth
|
4
|
+
module Strategies
|
5
|
+
class Frederick < OmniAuth::Strategies::OAuth2
|
6
|
+
option :name, :frederick
|
7
|
+
|
8
|
+
option :client_options, {
|
9
|
+
:site => ENV['FREDERICK_URL'] || "https://hirefrederick.com",
|
10
|
+
:authorize_url => "/oauth/authorize"
|
11
|
+
}
|
12
|
+
|
13
|
+
uid { raw_info["id"] }
|
14
|
+
|
15
|
+
info do
|
16
|
+
{
|
17
|
+
:email => raw_info["email"],
|
18
|
+
:first_name => raw_info["first_name"],
|
19
|
+
:last_name => raw_info["last_name"],
|
20
|
+
:business_id => raw_info["business_id"],
|
21
|
+
:is_consumer_only => raw_info["is_consumer_only"],
|
22
|
+
:super_admin => raw_info["super_admin"]
|
23
|
+
}
|
24
|
+
end
|
25
|
+
|
26
|
+
def raw_info
|
27
|
+
@raw_info ||= access_token.get('/api/v1/users/me').parsed
|
28
|
+
end
|
29
|
+
end
|
30
|
+
end
|
31
|
+
end
|
@@ -0,0 +1 @@
|
|
1
|
+
require 'omniauth/strategies/frederick'
|
@@ -0,0 +1,24 @@
|
|
1
|
+
# coding: utf-8
|
2
|
+
lib = File.expand_path('../lib', __FILE__)
|
3
|
+
$LOAD_PATH.unshift(lib) unless $LOAD_PATH.include?(lib)
|
4
|
+
require 'omniauth/frederick/version'
|
5
|
+
|
6
|
+
Gem::Specification.new do |spec|
|
7
|
+
spec.add_dependency 'omniauth-oauth2', '~> 1.1'
|
8
|
+
spec.name = 'omniauth-frederick'
|
9
|
+
spec.version = OmniAuth::Frederick::VERSION
|
10
|
+
spec.date = '2014-07-30'
|
11
|
+
spec.summary = "Frederick OmniAuth Strategy"
|
12
|
+
spec.description = "OmniAuth strategy for the Frederick API using OAuth2"
|
13
|
+
spec.authors = ["Frederick"]
|
14
|
+
spec.email = 'friends@hirefrederick.com'
|
15
|
+
spec.files = %w(omniauth-frederick.gemspec)
|
16
|
+
spec.files += Dir.glob('lib/**/*.rb')
|
17
|
+
spec.homepage = 'https://github.com/hirefrederick/omniauth-frederick'
|
18
|
+
spec.licenses = %w(MIT)
|
19
|
+
|
20
|
+
spec.required_ruby_version = '>= 1.9.3'
|
21
|
+
|
22
|
+
spec.add_development_dependency "bundler", "~> 1.6"
|
23
|
+
spec.add_development_dependency "rake"
|
24
|
+
end
|
metadata
ADDED
@@ -0,0 +1,89 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: omniauth-frederick
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.0.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Frederick
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2014-07-30 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.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.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.6'
|
34
|
+
type: :development
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - ~>
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.6'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: rake
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - '>='
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
55
|
+
description: OmniAuth strategy for the Frederick API using OAuth2
|
56
|
+
email: friends@hirefrederick.com
|
57
|
+
executables: []
|
58
|
+
extensions: []
|
59
|
+
extra_rdoc_files: []
|
60
|
+
files:
|
61
|
+
- lib/omniauth-frederick.rb
|
62
|
+
- lib/omniauth/frederick/version.rb
|
63
|
+
- lib/omniauth/strategies/frederick.rb
|
64
|
+
- omniauth-frederick.gemspec
|
65
|
+
homepage: https://github.com/hirefrederick/omniauth-frederick
|
66
|
+
licenses:
|
67
|
+
- MIT
|
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: 1.9.3
|
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: Frederick OmniAuth Strategy
|
89
|
+
test_files: []
|