Sha256: a284d303ec4c357e931f9cd6b470605d3f859afd6dc3bc8d2756a61ad7b2209e

Contents?: true

Size: 508 Bytes

Versions: 1

Compression:

Stored size: 508 Bytes

Contents

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

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

      uid do
        raw_info['id']
      end

      info do
        {uid: raw_info['id'], 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.5 lib/norseal/omniauth/strategy.rb