kmrshntr / omniauth-slack

omniauth-slack
MIT License
95 stars 156 forks source link

Allow OAuth scopes to be space-delimited in addition to comma-delimited #24

Closed speric closed 8 years ago

speric commented 8 years ago

According to Slack's OAuth docs (https://api.slack.com/docs/oauth), OAuth scopes can be space-delimited. However, this gem expects the scopes to be comma-delimited, as at lib/omniauth/strategies/slack.rb:73. In the context of that method, having multiple scopes, space-delimted, would cause the gem to skip putting the incoming_webhook params in the OAuth response, even if permissions for that scope were requested.

The intention of this PR/commit is to allow for flexibility when determining if incoming_webhook_allowed? based on the different, valid, ways of defining permission scopes.

kmrshntr commented 8 years ago

27 solves this problem, isn't it? Thank you for your contribution.

kmrshntr commented 8 years ago

The spece-delimited notation has gotten to be also available by #27.

speric commented 8 years ago

Thanks.

On Monday, May 30, 2016, Shintaro Kimura notifications@github.com wrote:

Closed #24 https://github.com/kmrshntr/omniauth-slack/pull/24.

— You are receiving this because you authored the thread. Reply to this email directly, view it on GitHub https://github.com/kmrshntr/omniauth-slack/pull/24#event-675887554, or mute the thread https://github.com/notifications/unsubscribe/AAJDY8n_PVugkKLkwCjCyyNizu2Zs8q-ks5qGrk7gaJpZM4G6Sdt .

Sent from Gmail Mobile