Sha256: 35fb5bb1ec68347ed8dc129abe23c1f13ebe8fe9d740770cd9fbe7cd3b7127b0

Contents?: true

Size: 591 Bytes

Versions: 3

Compression:

Stored size: 591 Bytes

Contents

module LinkedIn
  class Credentials
    extend Forwardable

    def_delegators :client, :auth_code

    def initialize(configuration)
      @configuration = configuration
    end

    def type
      :oauth2
    end

    def client
      @client ||= OAuth2::Client.new @configuration.key, @configuration.secret, oauth2_options
    end

    private

    def oauth2_options
      { site:          'https://api.linkedin.com',
        authorize_url: 'https://www.linkedin.com/uas/oauth2/authorization',
        token_url:     'https://www.linkedin.com/uas/oauth2/accessToken' }
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
linkedin2-0.0.19 lib/linkedin/credentials.rb
linkedin2-0.0.18 lib/linkedin/credentials.rb
linkedin2-0.0.17 lib/linkedin/credentials.rb