Sha256: a178f0235263ccdf3d03af84dc80624a80965089cb8f53e08eb0d83e8097bec3
Contents?: true
Size: 998 Bytes
Versions: 1
Compression:
Stored size: 998 Bytes
Contents
require 'omniauth-oauth2' require 'multi_json' module OmniAuth module Strategies class Droom < OmniAuth::Strategies::OAuth2 class NoAuthorizationCodeError < StandardError; end option :name, :droom option :provider_ignores_state, true option :fields, [:name, :forename, :email, :phone, :admin, :image] option :client_options, { :site => ENV['droom_host'], :authorize_url => "/oauth/authorize" } uid do raw_info["id"] end info do { :email => raw_info["email"], :name => raw_info["name"], :admin => raw_info["admin"], :forename => raw_info["forename"], :image => raw_info["image"] } end extra do { :raw_info => raw_info # here we will eventually receive activity permissions } end def raw_info @raw_info ||= access_token.get('/api/me.json').parsed end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
omniauth-droom-0.1.0 | lib/omniauth/strategies/droom.rb |