Class: OmniAuth::Strategies::Workingnotworking
- Inherits:
-
OAuth2
- Object
- OAuth2
- OmniAuth::Strategies::Workingnotworking
- Defined in:
- lib/omniauth/strategies/workingnotworking.rb
Instance Method Summary collapse
-
#authorize_params ⇒ Object
To make the ‘state` param actually useful, encode any additional params on the request to /auth/workingnotworking into the `state` param sent to the provider.
- #callback_url ⇒ Object
- #raw_info ⇒ Object
Instance Method Details
#authorize_params ⇒ Object
To make the ‘state` param actually useful, encode any additional params on the request to /auth/workingnotworking into the `state` param sent to the provider.
56 57 58 59 60 61 62 63 64 65 |
# File 'lib/omniauth/strategies/workingnotworking.rb', line 56 def .[:state] = SecureRandom.hex(24) + '|' + Base64.strict_encode64(request.params.to_param) params = ..merge(("authorize")) if OmniAuth.config.test_mode @env ||= {} @env["rack.session"] ||= {} end session["omniauth.state"] = params[:state] params end |
#callback_url ⇒ Object
73 74 75 |
# File 'lib/omniauth/strategies/workingnotworking.rb', line 73 def callback_url full_host + script_name + callback_path end |
#raw_info ⇒ Object
67 68 69 70 71 |
# File 'lib/omniauth/strategies/workingnotworking.rb', line 67 def raw_info @raw_info ||= access_token.get('/api/v1/account').parsed rescue ::Errno::ETIMEDOUT raise ::Timeout::Error end |