0.01
Low commit activity in last 3 years
No release in over a year
OmniAuth strategy for SageOne.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

 Project Readme

OmniAuth SageOne

Gem Version CI

This is an unofficial OmniAuth strategy for authenticating to SageOne. To use it, you'll need to sign up for a Sage One OAuth2 Application ID and Secret.

Basic Usage

use OmniAuth::Builder do
  provider :sageone, ENV['SAGE_CLIENT_ID'], ENV['SAGE_CLIENT_SECRET'], scope: 'full_access'
end

# Options for `scope` are either `readonly` or `full_access`.

Auth Hash

The hash in env['omniauth.auth'] will have the following information:

  • in credentials:
    • token: The access token.
    • refresh_token: The refresh token. Use this to get a new token when the one in token has been expired.
    • expires_at: Timestamp that indicates when token will expire.
    • expires: true
    • resource_owner_id: An ID returned by Sage One when fetching the access token. You'll need that value for API v3 for request signing and the X-SITE header that is required on API requests.
  • in info:
    • country: The user's country.
  • in uid: The requested_by_id returned by Sage One when fetching the token.

See Also

https://developer.sageone.com has the Sage One API documentation.