omniauth-cybozu 0.0.1 → 0.1.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 CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: e1d65d2b8a548600cb9dc4c66545ab174c1bff5a1383217ee95a3c2b81212ab7
4
- data.tar.gz: 4745b47d4b213cf1cda21fe5ad6f282581a36fe9a743d4bcdf99274c448c3ece
3
+ metadata.gz: 9bcf1bb41a133a217c8dbf4058e46389dc3e0c01c9d4a9d3612317e40054b127
4
+ data.tar.gz: 5105c587dac5346ea6491f8a287e7fa33f336cf010d8346d328af076fea9ebf0
5
5
  SHA512:
6
- metadata.gz: 7ef4afcddac612508e83c31d08f32f9ff85b5fe90e2d7fa23587abb7477675612b9814de8b30e43e8392ab72810bde4d9e294d46b556f3c2b3d794132a10f542
7
- data.tar.gz: '083642d2572aab0fcfa2507935fdce550b09a1e2165b8bf844663d8e2bae49f74689f8135f21fc573b0190da9a2cc2b9f1af3061461fbdd86af5dc05c5b6f805'
6
+ metadata.gz: 8a93a2d28e84cb26c1b3052f216e83340a9e87e4da853775870f4b8492e7d094b3797d704aa6bd46e27a359125350b783a322a399f9ed45f5f0b373578196f8e
7
+ data.tar.gz: 75b0d298187a4e7922532a8acad3bcdbe8b88396c95c46fc09cfc53a0a67a41008108f1a6a916a9e1c81671d6494fe5b263884ac0d827f323bc504d924dbf223
@@ -0,0 +1,3 @@
1
+ # 0.1.1
2
+
3
+ - Initial release
data/README.md CHANGED
@@ -2,13 +2,13 @@
2
2
 
3
3
  [![Gem Version](https://badge.fury.io/rb/omniauth-cybozu.svg)](http://badge.fury.io/rb/omniauth-cybozu)
4
4
 
5
- This gem contains the [Cybozu](https://cybozu.com/)([Kintone](https://www.kintone.com/)/[Garoon](https://garoon.cybozu.co.jp/)) strategy for OmniAuth.
5
+ This gem contains [Kintone](https://www.kintone.com/) and [Garoon](https://garoon.cybozu.co.jp/) strategy for OmniAuth.
6
6
 
7
7
  ## Before You Begin
8
8
 
9
9
  You should have already installed OmniAuth into your app; if not, read the [OmniAuth README](https://github.com/intridea/omniauth) to get started.
10
10
 
11
- Now sign into the [Kintone Developer Program](https://developer.kintone.io/hc/en-us/) and create an application. Take note of your API keys and refer to the following [How to add OAuth clients](https://developer.kintone.io/hc/en-us/articles/360001562353).
11
+ Now sign into the [Kintone Developer Program](https://developer.kintone.io/hc/en-us/) or [cybozu developer network](https://developer.cybozu.io/hc/ja) and create an application. Take note of your API keys.
12
12
 
13
13
  ## Using This Strategy
14
14
 
@@ -29,11 +29,17 @@ Next, tell OmniAuth about this provider. For a Rails app, your `config/initializ
29
29
  ```ruby
30
30
  Rails.application.config.middleware.use OmniAuth::Builder do
31
31
 
32
- # when access Kintone records
33
- provider :cybozu, "CLIENT_ID", "CLIENT_SECRET",{ scope: ['k:app_record:read', 'k:app_record:write'], client_options: { site: "https://{subdomain}.kintone.com"}}
32
+ # For kintone.com user
33
+ # Kintone records writable
34
+ kintone_site = 'https://{subdomain}.kintone.com'
35
+ kintone_scope = ['k:app_record:read', 'k:app_record:write'].join(' ')
36
+ provider :cybozu, "CLIENT_ID", "CLIENT_SECRET", { scope: kintone_scope, client_options: { site: kintone_site }}
34
37
 
35
- # when access Garoon schedules
36
- provider :cybozu, "CLIENT_ID", "CLIENT_SECRET",{ scope: ['k:app_record:read', 'k:app_record:write'], client_options: { site: "https://{subdomain}.cybozu.com"}}
38
+ # For cybozu.com user
39
+ # Garoon schedules writable
40
+ cybozu_site = 'https://{subdomain}.cybozu.com'
41
+ cybozu_scope = ['g:schedule:read', 'g:schedule:write'].join(' ')
42
+ provider :cybozu, "CLIENT_ID", "CLIENT_SECRET", :scope => cybozu_scope, :client_options => {:site => cybozu_site}
37
43
 
38
44
  end
39
45
  ```
@@ -47,7 +53,7 @@ The auth hash `request.env['omniauth.auth']` would look like this:
47
53
 
48
54
  ```js
49
55
  {
50
- "provider": "tanita",
56
+ "provider": "cybozu",
51
57
  "uid": null, // uid will be empty, because there is no apis to get.
52
58
  "credentials": {
53
59
  "token": "ACCESS_TOKEN",
@@ -2,6 +2,6 @@
2
2
 
3
3
  module Omniauth
4
4
  module Cybozu
5
- VERSION = '0.0.1'
5
+ VERSION = '0.1.1'
6
6
  end
7
7
  end
@@ -8,7 +8,7 @@ Gem::Specification.new do |spec|
8
8
  spec.authors = ['Kenji Koshikawa']
9
9
  spec.email = ['koshikawa2009@gmail.com']
10
10
 
11
- spec.summary = 'OmniAuth strategy for Cybozu'
11
+ spec.summary = 'OmniAuth strategy for cybozu(Kintone and Garoon)'
12
12
  spec.description = spec.description
13
13
  spec.homepage = 'https://github.com/koshilife/omniauth-cybozu'
14
14
  spec.license = 'MIT'
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-cybozu
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.1
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - Kenji Koshikawa
@@ -77,6 +77,7 @@ files:
77
77
  - ".rspec"
78
78
  - ".rubocop.yml"
79
79
  - ".travis.yml"
80
+ - CHANGELOG.md
80
81
  - CODE_OF_CONDUCT.md
81
82
  - Gemfile
82
83
  - LICENSE.txt
@@ -114,5 +115,5 @@ requirements: []
114
115
  rubygems_version: 3.1.3
115
116
  signing_key:
116
117
  specification_version: 4
117
- summary: OmniAuth strategy for Cybozu
118
+ summary: OmniAuth strategy for cybozu(Kintone and Garoon)
118
119
  test_files: []