Sha256: 76165d93c108efcfeb721e30a7b49febc465bc2ea2916a664341b33e9c58eb4e
Contents?: true
Size: 688 Bytes
Versions: 1
Compression:
Stored size: 688 Bytes
Contents
# frozen_string_literal: true require 'omniauth-oauth2' module OmniAuth module Strategies class Mspcfo < OmniAuth::Strategies::OAuth2 option :name, 'mspcfo' option :client_options, site: 'https://app.mspcfo.com' uid { raw_info['id'] } info do { name: raw_info['name'], email: raw_info['email'] } end extra do { raw_info: raw_info } end def raw_info @raw_info ||= if (resp = access_token.get('/me').parsed) resp['data'] || {} else {} end end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
omniauth-mspcfo-0.0.1 | lib/omniauth/strategies/mspcfo.rb |