The project is in a healthy, maintained state
OmniAuth strategy for authenticating against the USOS API at Nicolaus Copernicus University in Toruń (usosapps.umk.pl).
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies

Runtime

 Project Readme

omniauth-usosumk

OmniAuth OAuth 1.0a strategy for authenticating against the USOS API at Nicolaus Copernicus University in Toruń (usosapps.umk.pl).

Installation

Add to your application's Gemfile:

gem "omniauth-usosumk"

Then:

bundle install

Usage

Register your application with the USOS UMK administrators to obtain a consumer_key and consumer_secret. When registering, set the callback URL to /oauth/callback (or whatever you configure below).

Add the strategy to your OmniAuth middleware. In a Rails app, config/initializers/omniauth.rb:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :usosumk, ENV["USOSUMK_CONSUMER_KEY"], ENV["USOSUMK_CONSUMER_SECRET"]
end

Then send users to /auth/usosumk to start the OAuth flow. After the user authorizes, USOS redirects to your callback_url and OmniAuth populates request.env["omniauth.auth"] with:

{
  "provider" => "usosumk",
  "uid"      => "12345",
  "info"     => {
    "email"      => "student@umk.pl",
    "first_name" => "Jan",
    "last_name"  => "Kowalski"
  },
  "extra"    => { "raw_info" => { ... } }
}

Options

  • callback_url — path or full URL USOS will redirect to after authorization. Defaults to /oauth/callback. Must match what you registered on the USOS side.

Development

bundle install
bundle exec rspec

License

MIT.