Sha256: 73490bf366c349ef77fd035d9c3379f1c61a02b3a3c07ac8a14a6b0fd7dd23cb

Contents?: true

Size: 517 Bytes

Versions: 8

Compression:

Stored size: 517 Bytes

Contents

module OmniAuth
  module Strategies
    class Doorkeeper < OmniAuth::Strategies::OAuth2
      option :name, :doorkeeper
      option :client_options, site: 'http://core.dev',
                              authorize_path: '/oauth/authorize'

      uid do
        raw_info["id"]
      end

      info do
        {dossier_id: raw_info['dossier_id'],
         username: raw_info['username']}
      end

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

Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
roqua-core-api-0.0.20 lib/roqua/omniauth/strategies/doorkeeper.rb
roqua-core-api-0.0.19 lib/roqua/omniauth/strategies/doorkeeper.rb
roqua-core-api-0.0.18 lib/roqua/omniauth/strategies/doorkeeper.rb
roqua-core-api-0.0.17 lib/roqua/omniauth/strategies/doorkeeper.rb
roqua-core-api-0.0.16 lib/roqua/omniauth/strategies/doorkeeper.rb
roqua-core-api-0.0.15 lib/roqua/omniauth/strategies/doorkeeper.rb
roqua-core-api-0.0.14 lib/roqua/omniauth/strategies/doorkeeper.rb
roqua-core-api-0.0.13 lib/roqua/omniauth/strategies/doorkeeper.rb