omniauth-slack 2.1.1 → 2.1.2

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
  SHA1:
3
- metadata.gz: 102699ed9b3e98a5bce565a61d7de8b03788a57a
4
- data.tar.gz: 35956554bda56d5ccecd6f488d9f75dfcc700507
3
+ metadata.gz: a06a665cd9165067e6e52446714beafda6b38a84
4
+ data.tar.gz: dc3037e97c68103cc4066f2ee3d77112021b2c76
5
5
  SHA512:
6
- metadata.gz: 4e472c71e80dc9a6d6ad2d248b5c8c9292d4f69f90b780035e2fcfb4a28d4457b7c093536e50ad55bc5fdd99b0e2df186d5443526cf0dbc2148a2348b436e618
7
- data.tar.gz: ffe9c4daf7447481bc5754095baf50aebebe0011d2e06cf8dfe9147bf166903f4864236392faa3333b87c2e4ff7484eb07225f92e819d301cbabfa794901b26b
6
+ metadata.gz: 1c357611664892c40b920d7b9fc6b407f41e9c2d9b1ae6fb002ff5e49664fe1830f7a387e2e44f64d73cf27b0b61fde97cbf1b753eccccb61a45d7a941e5e8ee
7
+ data.tar.gz: 1e75caaec8fc5208827e1a150be0c9db6ee9ecaca6d88fa2ce55911c4fedec906fe5f1c61df9803923715e7928b2f377298597f744d7d408835d8c9446cfc64a
data/README.md CHANGED
@@ -2,6 +2,8 @@
2
2
 
3
3
  This Gem contains the Slack strategy for OmniAuth.
4
4
 
5
+ [![Gem Version](https://badge.fury.io/rb/omniauth-slack.svg)](http://badge.fury.io/rb/omniauth-slack)
6
+
5
7
  ## Before You Begin
6
8
 
7
9
  You should have already installed OmniAuth into your app; if not, read the [OmniAuth README](https://github.com/intridea/omniauth) to get started.
@@ -51,29 +53,6 @@ Slack lets you choose from a [few different scopes](https://api.slack.com/docs/o
51
53
 
52
54
  ## Authentication Options
53
55
 
54
- ### State
55
-
56
- > *unique string to be passed back upon completion*
57
-
58
- > The state parameter should be used to avoid forgery attacks by passing in a value that's unique to the user you're authenticating and checking it when auth completes.
59
-
60
- for a logged in user, you might want to include state, for example with devise:
61
-
62
- `https://www.yourapp.com/users/auth/slack?state=1234-foobutter`
63
-
64
- creates an auth session with `state`
65
-
66
- After a successful auth, the callback request will include `request.env["omniauth.params"]` hash
67
-
68
- ```ruby
69
- class CallbackController < ApplicationController
70
- def slack
71
- request.env["omniauth.params"]["state"]
72
- # => "1234-foobutter"
73
- end
74
- end
75
- ```
76
-
77
56
  ### Team
78
57
 
79
58
  > If you don't pass a team param, the user will be allowed to choose which team they are authenticating against. Passing this param ensures the user will auth against an account on that particular team.
@@ -96,7 +75,3 @@ end
96
75
 
97
76
 
98
77
  [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/kmrshntr/omniauth-slack/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
99
-
100
-
101
- [![Bitdeli Badge](https://d2weczhvl823v0.cloudfront.net/kmrshntr/omniauth-slack/trend.png)](https://bitdeli.com/free "Bitdeli Badge")
102
-
@@ -22,23 +22,23 @@ module OmniAuth
22
22
 
23
23
  info do
24
24
  {
25
- name: user_info['user'].fetch('profile')['real_name_normalized'],
26
- email: user_info['user'].fetch('profile')['email'],
25
+ name: user_info['user'].to_h['profile'].to_h['real_name_normalized'],
26
+ email: user_info['user'].to_h['profile'].to_h['email'],
27
27
  nickname: raw_info['user'],
28
- first_name: user_info['user'].fetch('profile')['first_name'],
29
- last_name: user_info['user'].fetch('profile')['last_name'],
30
- description: user_info['user'].fetch('profile')['title'],
31
- image_24: user_info['user'].fetch('profile')['image_24'],
32
- image_48: user_info['user'].fetch('profile')['image_48'],
33
- image: user_info['user'].fetch('profile')['image_192'],
28
+ first_name: user_info['user'].to_h['profile'].to_h['first_name'],
29
+ last_name: user_info['user'].to_h['profile'].to_h['last_name'],
30
+ description: user_info['user'].to_h['profile'].to_h['title'],
31
+ image_24: user_info['user'].to_h['profile'].to_h['image_24'],
32
+ image_48: user_info['user'].to_h['profile'].to_h['image_48'],
33
+ image: user_info['user'].to_h['profile'].to_h['image_192'],
34
34
  team: raw_info['team'],
35
35
  user: raw_info['user'],
36
36
  team_id: raw_info['team_id'],
37
- team_domain: team_info['team']['domain'],
37
+ team_domain: team_info['team'].to_h['domain'],
38
38
  user_id: raw_info['user_id'],
39
- is_admin: user_info['user']['is_admin'],
40
- is_owner: user_info['user']['is_owner'],
41
- time_zone: user_info['user']['tz']
39
+ is_admin: user_info['user'].to_h['is_admin'],
40
+ is_owner: user_info['user'].to_h['is_owner'],
41
+ time_zone: user_info['user'].to_h['tz']
42
42
  }
43
43
  end
44
44
 
@@ -1,5 +1,5 @@
1
1
  module Omniauth
2
2
  module Slack
3
- VERSION = "2.1.1"
3
+ VERSION = "2.1.2"
4
4
  end
5
5
  end
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: omniauth-slack
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.1.1
4
+ version: 2.1.2
5
5
  platform: ruby
6
6
  authors:
7
7
  - kimura
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2015-08-11 00:00:00.000000000 Z
11
+ date: 2015-09-11 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: omniauth-oauth2
@@ -119,7 +119,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
119
119
  version: '0'
120
120
  requirements: []
121
121
  rubyforge_project:
122
- rubygems_version: 2.4.3
122
+ rubygems_version: 2.2.2
123
123
  signing_key:
124
124
  specification_version: 4
125
125
  summary: OmniAuth strategy for Slack