omniauth-cohabitat-admin 1.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
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 2a53f55f894b98f0ab6a2d70378db33b1e9ebd9b
|
4
|
+
data.tar.gz: bf7907f7bc960c51d52f9e5322526aef59f37385
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: 42f7eb2e4c206283bbbd89a1dd8c72794a9d3bf1466636110a1157907f768ac2286d353c90325e74e257e248e4def4d125ca210da963e1c9f3b1ca8b3e5bec5c
|
7
|
+
data.tar.gz: c6e1341058ac327a2254f1bf7b64072ce003ba9af9759b181ea0f12b2dac9eda66545ef606aca6cd74ad656459f171feb3c05ded6107386cd6d67d977d65a949
|
@@ -0,0 +1,27 @@
|
|
1
|
+
require 'omniauth/strategies/oauth2'
|
2
|
+
|
3
|
+
module OmniAuth
|
4
|
+
module Strategies
|
5
|
+
class CohabitatAdmin < OmniAuth::Strategies::OAuth2
|
6
|
+
option :name, 'cohabitat_user'
|
7
|
+
|
8
|
+
option :client_options, {
|
9
|
+
:site => "#{ENV["OMNIAUTH_COHABITAT_ADMIN_BASE_URL"] || "https://konto.cohabitat.net"}",
|
10
|
+
:token_url => "#{ENV["OMNIAUTH_COHABITAT_ADMIN_BASE_URL"] || "https://konto.cohabitat.net"}/oauth2/token",
|
11
|
+
:authorize_url => "#{ENV["OMNIAUTH_COHABITAT_ADMIN_BASE_URL"] || "https://konto.cohabitat.net"}/oauth2/authorize/Admin",
|
12
|
+
}
|
13
|
+
|
14
|
+
uid { raw_info["id"] }
|
15
|
+
|
16
|
+
info do
|
17
|
+
{
|
18
|
+
email: raw_info["email"]
|
19
|
+
}
|
20
|
+
end
|
21
|
+
|
22
|
+
def raw_info
|
23
|
+
@raw_info ||= access_token.get('/oauth/user_info.json').parsed
|
24
|
+
end
|
25
|
+
end
|
26
|
+
end
|
27
|
+
end
|
@@ -0,0 +1,20 @@
|
|
1
|
+
$:.push File.expand_path("../lib", __FILE__)
|
2
|
+
|
3
|
+
require "omniauth-cohabitat-admin/version"
|
4
|
+
|
5
|
+
Gem::Specification.new do |s|
|
6
|
+
s.name = "omniauth-cohabitat-admin"
|
7
|
+
s.version = OmniAuth::CohabitatAdmin::VERSION
|
8
|
+
s.authors = ["Marcin Lewandowski"]
|
9
|
+
s.email = ["marcin@saepia.net"]
|
10
|
+
s.homepage = "http://github.com/Cohabitat/omniauth-cohabitat-admin"
|
11
|
+
s.summary = "Official OmniAuth strategy for admins of Cohabitat apps"
|
12
|
+
s.description = "Official OmniAuth strategy for admins of Cohabitat apps"
|
13
|
+
|
14
|
+
s.add_dependency 'omniauth', '~> 1.0'
|
15
|
+
s.add_dependency 'omniauth-oauth2', '~> 1.1'
|
16
|
+
|
17
|
+
s.files = `git ls-files`.split("\n")
|
18
|
+
s.require_paths = ['lib']
|
19
|
+
s.required_ruby_version = '>= 1.9.3'
|
20
|
+
end
|
metadata
ADDED
@@ -0,0 +1,75 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: omniauth-cohabitat-admin
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 1.1.0
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Marcin Lewandowski
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2015-06-19 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
|
+
description: Official OmniAuth strategy for admins of Cohabitat apps
|
42
|
+
email:
|
43
|
+
- marcin@saepia.net
|
44
|
+
executables: []
|
45
|
+
extensions: []
|
46
|
+
extra_rdoc_files: []
|
47
|
+
files:
|
48
|
+
- lib/omniauth-cohabitat-admin.rb
|
49
|
+
- lib/omniauth-cohabitat-admin/version.rb
|
50
|
+
- lib/omniauth/strategies/cohabitat-admin.rb
|
51
|
+
- omniauth-cohabitat-admin.gemspec
|
52
|
+
homepage: http://github.com/Cohabitat/omniauth-cohabitat-admin
|
53
|
+
licenses: []
|
54
|
+
metadata: {}
|
55
|
+
post_install_message:
|
56
|
+
rdoc_options: []
|
57
|
+
require_paths:
|
58
|
+
- lib
|
59
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
60
|
+
requirements:
|
61
|
+
- - ">="
|
62
|
+
- !ruby/object:Gem::Version
|
63
|
+
version: 1.9.3
|
64
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
65
|
+
requirements:
|
66
|
+
- - ">="
|
67
|
+
- !ruby/object:Gem::Version
|
68
|
+
version: '0'
|
69
|
+
requirements: []
|
70
|
+
rubyforge_project:
|
71
|
+
rubygems_version: 2.2.2
|
72
|
+
signing_key:
|
73
|
+
specification_version: 4
|
74
|
+
summary: Official OmniAuth strategy for admins of Cohabitat apps
|
75
|
+
test_files: []
|