Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

omniauth-myob-adfs-oauth

Package Overview
Dependencies
Maintainers
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

omniauth-myob-adfs-oauth

  • 0.0.4
  • Rubygems
  • Socket score

Version published
Maintainers
1
Created
Source

OmniauthMyobOauth2

Strategy to authenticate with MYOB via ADFS OAuth2 in OmniAuth.

Installation

Add this line to your application's Gemfile:

gem 'omniauth-myob-adfs-oauth2'

And then execute:

$ bundle install

Usage

Here's an example for adding the middleware to a Rails app in config/initializers/omniauth.rb:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :myob_adfs_oauth2, your_client_id, your_client_secret
end

Configuration

You can configure several options, which you pass in to the provider method via a hash:

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :myob_oauth2, your_client_id, your_client_secret,
  { 
      client_options: { site: 'https://test.secure.myob.com' }, #set the target site to SIT
      scope: 'mydot.assets' #set the scope you want
  }
end

Auth Hash

Here's an example of an authentication hash available in the callback by accessing request.env["omniauth.auth"]:

{
  "provider"=>"myob_oauth2", 
  "uid"=>"ab359535-7be6-49a2-b9fd-xxxxxxx", 
  "info"=>{
    "email"=>"test@my.com", 
    "name"=>"test@my.com"
  }, 
  "credentials"=>{
    "token"=>"a token", 
    "refresh_token"=>"a refresh token, 
    "expires_at"=>1406161910, 
    "expires"=>true
  }, 
  "extra"=>{
    "raw_info"=>{
      "uid"=>"ab359535-7be6-49a2-b9fd-db65af2e22e7", 
      "username"=>"vidya@my.com"}
    }
  }
}

Contributing

  1. Fork it
  2. Create your feature branch (git checkout -b my-new-feature)
  3. Commit your changes (git commit -am 'Add some feature')
  4. Push to the branch (git push origin my-new-feature)
  5. Create new Pull Request

FAQs

Package last updated on 08 Sep 2014

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc