Sha256: 1191c2844a5667d6d2baa609caad634ea2895ae9405bce2ef322baabd765f0dc
Contents?: true
Size: 623 Bytes
Versions: 1
Compression:
Stored size: 623 Bytes
Contents
require 'omniauth-oauth2' module OmniAuth module Strategies class Toshl < OmniAuth::Strategies::OAuth2 option :name, 'toshl' option :client_options, { site: 'https://api.toshl.com', authorize_url: 'https://toshl.com/oauth2/authorize', token_url: 'https://toshl.com/oauth2/token'} 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 ||= access_token.get('/me').parsed end end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
omniauth-toshl-0.0.1 | lib/omniauth/strategies/toshl.rb |