lib/omniauth/heart.rb
def authorize_path
        session[:state] = "#{Time.now.to_i}/#{SecureRandom.hex(18)}"

        auth_server_config["authorization_endpoint"] + "?" +
                                "response_type=code&" +
                                "client_id=#{client_options.client_id}&" + 
                                "redirect_uri=#{generate_callback_path}&" +
                                "state=#{session[:state]}"
      end
##
# Creates the URI to access the authorization server's authorization endpoint
# with the appropriate parameters (e.g. client ID).  The client ID was provided 
# when we registered the client with the authorization server.
#
# A random state is also passed along as part of the URI to help us ensure that 
# further communication for this authorization is not due to a CSRF attack.
#
# Returns:
#   +String+::                Path and parameters to get authorization code
Creates the URI to access the authorization server's authorization endpoint
with the appropriate parameters .  The client ID was provided
when we registered the client with the authorization server.

A random state is also passed along as part of the URI to help us ensure that
further communication for this authorization is not due to a CSRF attack.

+String+::                Path and parameters to get authorization code
Creates the URI to access the authorization server ' s authorization endpoint with the appropriate parameters . The client ID was provided when we registered the client with the authorization server . A random state is also passed along as part of the URI to help us ensure that further communication for this authorization is not due to a CSRF attack . + String + :: Path and parameters to get authorization code
def authorize_path
        session[:state] = "#{Time.now.to_i}/#{SecureRandom.hex(18)}"
        auth_server_config["authorization_endpoint"] + "?" +
                                "response_type=code&" +
                                "client_id=#{client_options.client_id}&" + 
                                "redirect_uri=#{generate_callback_path}&" +
                                "state=#{session[:state]}"
      end
def authorize_path session [ :state ] = "#{Time.now.to_i}/#{SecureRandom.hex(18)}" auth_server_config [ "authorization_endpoint" ] + "?" + "response_type=code&" + "client_id=#{client_options.client_id}&" + "redirect_uri=#{generate_callback_path}&" + "state=#{session[:state]}" end
Creates the URI to access the authorization server's authorization endpoint
with the appropriate parameters (e.g.
Creates the URI to access the authorization server ' s authorization endpoint with the appropriate parameters ( e . g .