Project

iauth

0.0
No commit activity in last 3 years
No release in over 3 years
Authenticate with BUAA's ihome.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

北航 ihome 社区第三方验证系统 IAuth Ruby SDK

Install(Gem)

gem install iauth

Install(Bundler)

echo "gem 'iauth'" >> Gemfile

Usage

require 'iauth'
require 'securerandom'
iauth = IAuth.new 'your app id here', 'your app secret here'
state = SecureRandom 8
login_url = iauth.login_url state

# redirect to login url, when logged in, it will redirect to callback url with param verifier and state

# if it redirected to login callback url, use `iauth.auth`, else `iauth.login`
iauth.auth verifier, state

License

MIT License