Sha256: 64d890f5ec97622f07d6d5308fdc61a4389924b7bc4277a5cafe03849304721c
Contents?: true
Size: 1.22 KB
Versions: 2
Compression:
Stored size: 1.22 KB
Contents
# OmniAuth SageOne 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. Use that information to get the correct base URL (Sage One has different ones for different countries). - 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.
Version data entries
2 entries across 2 versions & 1 rubygems
Version | Path |
---|---|
omniauth-sageone-0.3.0 | README.md |
omniauth-sageone-0.2.0 | README.md |