Remove gems commited to repo by mistake take 2.

This commit is contained in:
Guo Xiang Tan 2019-05-13 09:10:45 +08:00
parent 141f222dc5
commit bcd3d85c81
10 changed files with 0 additions and 215 deletions

Binary file not shown.

View File

@ -1,4 +0,0 @@
*.gem
.bundle
Gemfile.lock
pkg/*

View File

@ -1,6 +0,0 @@
source "http://rubygems.org"
# Specify your gem's dependencies in omniauth-steam.gemspec
gemspec
gem "rake"

View File

@ -1,70 +0,0 @@
# OmniAuth Steam
This gem is an OmniAuth 1.0 strategy, supporting the Steam OpenID provider.
## Usage
Add to your `Gemfile`:
```ruby
gem 'omniauth-steam'
```
And then integrate the strategy into your middleware:
```ruby
use OmniAuth::Builder do
provider :steam, "my-steam-web-api-key"
end
```
If you are using Rails, you may want to add it to the middleware stack:
```ruby
Rails.application.config.middleware.use OmniAuth::Builder do
provider :steam, ENV['STEAM_WEB_API_KEY']
end
```
You will need to provide your Steam Web API key to be able to retrieve information about the authenticated user. You can request one by filling out [this form](http://steamcommunity.com/dev/apikey).
For additional information, please refer to the [OmniAuth wiki](https://github.com/intridea/omniauth/wiki).
## Authentication Hash
Here's an example of the *Authentication Hash* available in `request.env['omniauth.auth']`
```ruby
{
:provider => "steam",
:uid => "76561198010202071",
:info => {
:nickname => "Reu",
:name => "Rodrigo Navarro",
:location => "BR",
:image => "http://media.steampowered.com/steamcommunity/public/images/avatars/3c/3c91a935dca0c1e243f3a67a198b0abea9cf6d48_medium.jpg",
:urls => {
:Profile => "http://steamcommunity.com/id/rnavarro1/"
}
},
:credentials => {},
:extra => {
:raw_info => {
:steamid => "76561198010202071",
:communityvisibilitystate => 3,
:profilestate => 1,
:personaname => "Reu",
:lastlogoff => 1325637158,
:profileurl => "http://steamcommunity.com/id/rnavarro1/",
:avatar => "http://media.steampowered.com/steamcommunity/public/images/avatars/3c/3c91a935dca0c1e243f3a67a198b0abea9cf6d48.jpg",
:avatarmedium => "http://media.steampowered.com/steamcommunity/public/images/avatars/3c/3c91a935dca0c1e243f3a67a198b0abea9cf6d48_medium.jpg",
:avatarfull => "http://media.steampowered.com/steamcommunity/public/images/avatars/3c/3c91a935dca0c1e243f3a67a198b0abea9cf6d48_full.jpg",
:personastate => 1,
:realname => "Rodrigo Navarro",
:primaryclanid => "103582791432706194",
:timecreated => 1243031082,
:loccountrycode => "BR"
}
}
}
```

View File

@ -1 +0,0 @@
require "bundler/gem_tasks"

View File

@ -1,2 +0,0 @@
require "omniauth-steam/version"
require File.expand_path("../omniauth/strategies/steam", __FILE__)

View File

@ -1,5 +0,0 @@
module OmniAuth
module Steam
VERSION = "1.0.6"
end
end

View File

@ -1,72 +0,0 @@
require 'omniauth-openid'
require 'multi_json'
module OmniAuth
module Strategies
class Steam < OmniAuth::Strategies::OpenID
args :api_key
option :api_key, nil
option :name, "steam"
option :identifier, "http://steamcommunity.com/openid"
uid { steam_id }
info do
begin
{
"nickname" => player["personaname"],
"name" => player["realname"],
"location" => [player["loccityid"], player["locstatecode"], player["loccountrycode"]].compact.join(", "),
"image" => player["avatarmedium"],
"urls" => {
"Profile" => player["profileurl"],
"FriendList" => friend_list_url
}
}
rescue MultiJson::ParseError => exception
fail!(:steamError, exception)
{}
end
end
extra do
begin
{ "raw_info" => player }
rescue MultiJson::ParseError => exception
fail!(:steamError, exception)
{}
end
end
private
def raw_info
@raw_info ||= options.api_key ? MultiJson.decode(Net::HTTP.get(player_profile_uri)) : {}
end
def player
@player ||= raw_info["response"]["players"].first
end
def steam_id
@steam_id ||= begin
claimed_id = openid_response.display_identifier.split('/').last
expected_uri = %r{\Ahttps?://steamcommunity\.com/openid/id/#{claimed_id}\Z}
unless expected_uri.match(openid_response.endpoint.claimed_id)
raise 'Steam Claimed ID mismatch!'
end
claimed_id
end
end
def player_profile_uri
URI.parse("https://api.steampowered.com/ISteamUser/GetPlayerSummaries/v0002/?key=#{options.api_key}&steamids=#{steam_id}")
end
def friend_list_url
URI.parse("https://api.steampowered.com/ISteamUser/GetFriendList/v0001/?key=#{options.api_key}&steamid=#{steam_id}&relationship=friend")
end
end
end
end

View File

@ -1,22 +0,0 @@
# -*- encoding: utf-8 -*-
$:.push File.expand_path("../lib", __FILE__)
require "omniauth-steam/version"
Gem::Specification.new do |s|
s.name = "omniauth-steam"
s.version = OmniAuth::Steam::VERSION
s.authors = ["Rodrigo Navarro"]
s.email = ["rnavarro1@gmail.com"]
s.homepage = "https://github.com/reu/omniauth-steam"
s.summary = "Steam strategy for OmniAuth"
s.rubyforge_project = "omniauth-steam"
s.files = `git ls-files`.split("\n") - `git ls-files examples`.split("\n")
s.test_files = `git ls-files -- {test,spec,features}/*`.split("\n")
s.executables = `git ls-files -- bin/*`.split("\n").map{ |f| File.basename(f) }
s.require_paths = ["lib"]
s.add_runtime_dependency "omniauth-openid"
s.add_runtime_dependency "multi_json"
end

View File

@ -1,33 +0,0 @@
# -*- encoding: utf-8 -*-
# stub: omniauth-steam 1.0.6 ruby lib
Gem::Specification.new do |s|
s.name = "omniauth-steam".freeze
s.version = "1.0.6"
s.required_rubygems_version = Gem::Requirement.new(">= 0".freeze) if s.respond_to? :required_rubygems_version=
s.require_paths = ["lib".freeze]
s.authors = ["Rodrigo Navarro".freeze]
s.date = "2018-07-30"
s.email = ["rnavarro1@gmail.com".freeze]
s.homepage = "https://github.com/reu/omniauth-steam".freeze
s.rubygems_version = "3.0.3".freeze
s.summary = "Steam strategy for OmniAuth".freeze
s.installed_by_version = "3.0.3" if s.respond_to? :installed_by_version
if s.respond_to? :specification_version then
s.specification_version = 4
if Gem::Version.new(Gem::VERSION) >= Gem::Version.new('1.2.0') then
s.add_runtime_dependency(%q<omniauth-openid>.freeze, [">= 0"])
s.add_runtime_dependency(%q<multi_json>.freeze, [">= 0"])
else
s.add_dependency(%q<omniauth-openid>.freeze, [">= 0"])
s.add_dependency(%q<multi_json>.freeze, [">= 0"])
end
else
s.add_dependency(%q<omniauth-openid>.freeze, [">= 0"])
s.add_dependency(%q<multi_json>.freeze, [">= 0"])
end
end