Skip to content

dfan14051/Auth-Tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

27 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

AuthTool

General purpose OAuth tool for API integrations. Utilizes signet.

Usage

require 'atuh_tool'

client = AuthTool::get_client {secrets hash}
AuthTool::get_redirect_url client

# receive data from front-end

AuthTool::receive(client,response)
AuthTool::call(client, "get" "https://api.example.com/endpoint", params)

GET

All query parameters just go into the params array for AuthTool::call. Any headers must go into the params hash as a :headers hash.

Example:

params = {"username" => "user", "created" => "date", :headers => {"headerKey" => headerHash}}

POST

Headers go into the params hash as a :headers hash. Body goes into params as a :body hash. Anything else can just go into params. Example:

params = {:headers => {"key" => "value"}, :body => {"key" => "value"}, "something_else" => "else"}

About

Securable Auth Tool for integrations

Resources

License

Code of conduct

Stars

Watchers

Forks

Packages

No packages published