lib/omniauth/strategies/paymium.rb in omniauth-paymium-1.0.8 vs lib/omniauth/strategies/paymium.rb in omniauth-paymium-1.0.9
- old
+ new
@@ -37,13 +37,25 @@
'email' => raw_info['email'],
'name' => raw_info['name']
}
end
+ admin_info do
+ {
+ 'email' => admin_info['email'],
+ 'name' => admin_info['name']
+ }
+ end
+
def raw_info
access_token.options[:parse] = :json
- @raw_info ||= access_token.get("#{options.client_options.site}/api/v1/admin").parsed
+ @raw_info ||= access_token.get("#{options.client_options.site}/api/v1/user").parsed
+ end
+
+ def admin_info
+ access_token.options[:parse] = :json
+ @admin_info ||= access_token.get("#{options.client_options.site}/api/v1/admin").parsed
end
end
end
end