Sha256: 356a23142abd2b74bdd2c8166f13acf1bd375115fc1032232c435ef9437df9eb

Contents?: true

Size: 484 Bytes

Versions: 1

Compression:

Stored size: 484 Bytes

Contents

module OmniAuth
  module Strategies
    class Norseal < ::OmniAuth::Strategies::OAuth2
      option :name, :norseal

      option :client_options, {
        site: 'http://indentity.norseal.co.uk',
        authorize_url: '/oauth/authorize'
      }

      uid do
        raw_info['id']
      end

      info do
        {email: raw_info['email'], name: raw_info['name']}
      end

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

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
norseal-omniauth-0.1.1 lib/norseal/omniauth/strategy.rb