Sha256: 9d9712825dbfe87541e130f3cccf819886d8e458d63dbacfb86e44c68f9d2159
Contents?: true
Size: 859 Bytes
Versions: 1
Compression:
Stored size: 859 Bytes
Contents
require 'omniauth-oauth' module OmniAuth module Strategies class Sourceforge < OmniAuth::Strategies::OAuth option :client_options, { site: 'https://sourceforge.net', request_token_path: '/rest/oauth/request_token', authorize_path: '/rest/oauth/authorize', access_token_path: '/rest/oauth/access_token' } uid { raw_info['id'].to_s } info do { name: raw_info['name'], username: raw_info['username'], email: raw_info['email'], image: raw_info['avatar_url'] } end extra do { raw_info: raw_info } end def raw_info @raw_info ||= access_token.get('/rest/u').parsed end end end end OmniAuth.config.add_camelization 'sourceforge', 'Sourceforge'
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
omniauth-sourceforge-1.0.0 | lib/omniauth/strategies/sourceforge.rb |