omniauth-clickup 0.0.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +7 -0
- data/.gitignore +1 -0
- data/LICENSE.txt +20 -0
- data/README.md +32 -0
- data/lib/omniauth-clickup.rb +2 -0
- data/lib/omniauth-clickup/version.rb +5 -0
- data/lib/omniauth/strategies/click_up.rb +48 -0
- data/omniauth-clickup.gemspec +22 -0
- metadata +93 -0
checksums.yaml
ADDED
@@ -0,0 +1,7 @@
|
|
1
|
+
---
|
2
|
+
SHA1:
|
3
|
+
metadata.gz: 292eba05586cd037cc2cc20b78755c56fc9dc068
|
4
|
+
data.tar.gz: 69fd231d91f9af2432c2701732295f95d9f219f6
|
5
|
+
SHA512:
|
6
|
+
metadata.gz: c26107c278a2a9041544a9f8d7271ba4106435f7a56324bcf600f83b69b149d47fb5c771fa35fa720c211a112aad1341666d809122da5d51a6e684b32e883d8e
|
7
|
+
data.tar.gz: ae0eedab298cad5f1ec338efcbb3d0281241edd069b5a4503af6b993e68c997ef6a5b7d3f127202e8637f5f90ff1a63450890ae5abe324210f2453f551608a17
|
data/.gitignore
ADDED
@@ -0,0 +1 @@
|
|
1
|
+
*.gem
|
data/LICENSE.txt
ADDED
@@ -0,0 +1,20 @@
|
|
1
|
+
MIT Licene
|
2
|
+
|
3
|
+
Permission is hereby granted, free of charge, to any person obtaining
|
4
|
+
a copy of this software and associated documentation files (the
|
5
|
+
"Software"), to deal in the Software without restriction, including
|
6
|
+
without limitation the rights to use, copy, modify, merge, publish,
|
7
|
+
distribute, sublicense, and/or sell copies of the Software, and to
|
8
|
+
permit persons to whom the Software is furnished to do so, subject to
|
9
|
+
the following conditions:
|
10
|
+
|
11
|
+
The above copyright notice and this permission notice shall be
|
12
|
+
included in all copies or substantial portions of the Software.
|
13
|
+
|
14
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
15
|
+
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
16
|
+
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
17
|
+
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
18
|
+
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
19
|
+
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
20
|
+
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
data/README.md
ADDED
@@ -0,0 +1,32 @@
|
|
1
|
+
# omniauth-clickup
|
2
|
+
|
3
|
+
This is the OmniAuth strategy for authenticating to [ClickUp](https://www.clickup.com).
|
4
|
+
To use it, you'll need to create an Oauth Application in the Team settings page of Clickup web app and copy the Client ID and Client Secret.
|
5
|
+
|
6
|
+
## Installation
|
7
|
+
|
8
|
+
```ruby
|
9
|
+
gem 'omniauth-clickup', git: "https://github.com/SupportBee/omniauth-clickup"
|
10
|
+
```
|
11
|
+
|
12
|
+
## Basic Usage
|
13
|
+
|
14
|
+
```ruby
|
15
|
+
use OmniAuth::Builder do
|
16
|
+
provider :clickup, ENV['client_id'], ENV['client_secret']
|
17
|
+
end
|
18
|
+
```
|
19
|
+
|
20
|
+
## Credits
|
21
|
+
|
22
|
+
This gem was authored by [SupportBee](https://supportbee.com/) to integrate ClickUp with their [Integrations Platform](https://github.com/SupportBee/SupportBee-Apps).
|
23
|
+
|
24
|
+
## License
|
25
|
+
|
26
|
+
**MIT License**
|
27
|
+
|
28
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
|
29
|
+
|
30
|
+
The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
|
31
|
+
|
32
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
@@ -0,0 +1,48 @@
|
|
1
|
+
require 'omniauth-oauth2'
|
2
|
+
|
3
|
+
module OmniAuth
|
4
|
+
module Strategies
|
5
|
+
class ClickUp < OmniAuth::Strategies::OAuth2
|
6
|
+
# Give your strategy a name.
|
7
|
+
option :name, "click_up"
|
8
|
+
|
9
|
+
# This is where you pass the options you would pass when
|
10
|
+
# initializing your consumer from the OAuth gem.
|
11
|
+
option :client_options, {
|
12
|
+
site: "https://api.clickup.com/api/v1/",
|
13
|
+
authorize_url: "https://app.clickup.com/api",
|
14
|
+
token_url: "https://api.clickup.com/api/v1/oauth/token"
|
15
|
+
}
|
16
|
+
|
17
|
+
# These are called after authentication has succeeded. If
|
18
|
+
# possible, you should try to set the UID without making
|
19
|
+
# additional calls (if the user id is returned with the token
|
20
|
+
# or as a URI parameter). This may not be possible with all
|
21
|
+
# providers.
|
22
|
+
def request_phase
|
23
|
+
super
|
24
|
+
end
|
25
|
+
|
26
|
+
def callback_phase
|
27
|
+
super
|
28
|
+
end
|
29
|
+
|
30
|
+
uid do
|
31
|
+
raw_info['user']['id']
|
32
|
+
end
|
33
|
+
|
34
|
+
info do
|
35
|
+
raw_info
|
36
|
+
end
|
37
|
+
|
38
|
+
extra do
|
39
|
+
raw_info
|
40
|
+
end
|
41
|
+
|
42
|
+
def raw_info
|
43
|
+
access_token.options[:header_format] = "%s"
|
44
|
+
@raw_info ||= JSON.load(access_token.get('user').body)
|
45
|
+
end
|
46
|
+
end
|
47
|
+
end
|
48
|
+
end
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# -*- encoding: utf-8 -*-
|
2
|
+
require File.expand_path('../lib/omniauth-clickup/version', __FILE__)
|
3
|
+
|
4
|
+
Gem::Specification.new do |gem|
|
5
|
+
gem.authors = ["Avinasha Sastry"]
|
6
|
+
gem.email = ["me@avinasha.com"]
|
7
|
+
gem.description = %q{OmniAuth strategy for ClickUp.}
|
8
|
+
gem.summary = %q{OmniAuth strategy for ClickUp.}
|
9
|
+
gem.homepage = "https://github.com/SupportBee/omniauth-clickup"
|
10
|
+
gem.license = "MIT"
|
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.name = "omniauth-clickup"
|
15
|
+
gem.require_paths = ["lib"]
|
16
|
+
gem.version = OmniAuth::ClickUp::VERSION
|
17
|
+
|
18
|
+
gem.add_dependency 'omniauth', '~> 1.0'
|
19
|
+
gem.add_dependency 'omniauth-oauth2', '~> 1.0'
|
20
|
+
|
21
|
+
gem.add_development_dependency "bundler", "~> 1.0"
|
22
|
+
end
|
metadata
ADDED
@@ -0,0 +1,93 @@
|
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
|
+
name: omniauth-clickup
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.0.1
|
5
|
+
platform: ruby
|
6
|
+
authors:
|
7
|
+
- Avinasha Sastry
|
8
|
+
autorequire:
|
9
|
+
bindir: bin
|
10
|
+
cert_chain: []
|
11
|
+
date: 2018-02-26 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.0'
|
34
|
+
type: :runtime
|
35
|
+
prerelease: false
|
36
|
+
version_requirements: !ruby/object:Gem::Requirement
|
37
|
+
requirements:
|
38
|
+
- - "~>"
|
39
|
+
- !ruby/object:Gem::Version
|
40
|
+
version: '1.0'
|
41
|
+
- !ruby/object:Gem::Dependency
|
42
|
+
name: bundler
|
43
|
+
requirement: !ruby/object:Gem::Requirement
|
44
|
+
requirements:
|
45
|
+
- - "~>"
|
46
|
+
- !ruby/object:Gem::Version
|
47
|
+
version: '1.0'
|
48
|
+
type: :development
|
49
|
+
prerelease: false
|
50
|
+
version_requirements: !ruby/object:Gem::Requirement
|
51
|
+
requirements:
|
52
|
+
- - "~>"
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '1.0'
|
55
|
+
description: OmniAuth strategy for ClickUp.
|
56
|
+
email:
|
57
|
+
- me@avinasha.com
|
58
|
+
executables: []
|
59
|
+
extensions: []
|
60
|
+
extra_rdoc_files: []
|
61
|
+
files:
|
62
|
+
- ".gitignore"
|
63
|
+
- LICENSE.txt
|
64
|
+
- README.md
|
65
|
+
- lib/omniauth-clickup.rb
|
66
|
+
- lib/omniauth-clickup/version.rb
|
67
|
+
- lib/omniauth/strategies/click_up.rb
|
68
|
+
- omniauth-clickup.gemspec
|
69
|
+
homepage: https://github.com/SupportBee/omniauth-clickup
|
70
|
+
licenses:
|
71
|
+
- MIT
|
72
|
+
metadata: {}
|
73
|
+
post_install_message:
|
74
|
+
rdoc_options: []
|
75
|
+
require_paths:
|
76
|
+
- lib
|
77
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
78
|
+
requirements:
|
79
|
+
- - ">="
|
80
|
+
- !ruby/object:Gem::Version
|
81
|
+
version: '0'
|
82
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
83
|
+
requirements:
|
84
|
+
- - ">="
|
85
|
+
- !ruby/object:Gem::Version
|
86
|
+
version: '0'
|
87
|
+
requirements: []
|
88
|
+
rubyforge_project:
|
89
|
+
rubygems_version: 2.5.1
|
90
|
+
signing_key:
|
91
|
+
specification_version: 4
|
92
|
+
summary: OmniAuth strategy for ClickUp.
|
93
|
+
test_files: []
|