I hereby claim:
- I am davidwilliam on github.
- I am davidwsilva (https://keybase.io/davidwsilva) on keybase.
- I have a public key ASAFUtY3LLfKIzzzEHhvPgHWLuTtOZzIaLfpA_fiEnrNiQo
To claim this, I am signing this object:
| #!/usr/bin/ruby | |
| require 'digest' | |
| module Password | |
| class BruteForce | |
| attr_accessor :validation, :hash_value, :type_id, :hash_algorithm_id, :length, :collections | |
| def initialize(argv) | |
| @hash_value, @type_id, @hash_algorithm_id, @length = argv |
I hereby claim:
To claim this, I am signing this object:
| require 'omniauth-oauth2' | |
| module Omniauth | |
| module Strategies | |
| class Oi < OmniAuth::Strategies::OAuth2 | |
| # Give your strategy a name. | |
| option :name, "oi" | |
| # This is where you pass the options you would pass when | |
| # initializing your consumer from the OAuth gem. |
| class SessionsController < Devise::SessionsController | |
| # DELETE /resource/sign_out | |
| def destroy | |
| user = current_user | |
| credential = user.credentials.oi.first | |
| signed_out = (Devise.sign_out_all_scopes ? sign_out : sign_out(resource_name)) | |
| set_flash_message :notice, :signed_out if signed_out && is_flashing_format? |
| # encoding: utf-8 | |
| class User < ActiveRecord::Base | |
| # Include default devise modules. Others available are: | |
| # :confirmable, :lockable, :timeoutable and :omniauthable | |
| devise :database_authenticatable, :registerable, | |
| :recoverable, :rememberable, :trackable, :validatable, :omniauthable, omniauth_providers: [:oi] | |
| has_many :credentials | |
| def self.find_for_oi_authentication(request) |
| require 'mechanize' | |
| class Gazeta | |
| def source | |
| browser.get(base_url + root_path) | |
| end | |
| def root_path | |
| "/jogorapido/jogorapido-1.html" |