Sha256: 9c850229baec29992f2d99e6b71265edb06c9b72030f7d796ad49a7232808949

Contents?: true

Size: 503 Bytes

Versions: 1

Compression:

Stored size: 503 Bytes

Contents

require 'omniauth-oauth2'

module OmniAuth
  module Strategies
    class G5 < OmniAuth::Strategies::OAuth2
      option :name, :g5

      option :client_options, {
        :site => 'https://auth.g5search.com',
        :authorize_url => '/oauth/authorize',
        :token_url => '/oauth/token'
      }

      uid { raw_info['id'] }

      info do
        {:email => raw_info['email']}
      end

      def raw_info
        @raw_info ||= access_token.get('/v1/me.json').parsed
      end
    end
  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
omniauth-g5-0.1.0 lib/omniauth/strategies/g5.rb