Sha256: e207c18e49321a45f89141b880e9dccb3685852764b382d6bfe8c2ecffc68ff3

Contents?: true

Size: 1.19 KB

Versions: 9

Compression:

Stored size: 1.19 KB

Contents

= SalesKing OmniAuth Strategy

If you are into omniAuth you can use this class to authenticate with SalesKing.
Since every SK Account resides within its own subdomain, you need to set it
before you want to use it.

You can use this file as a starting point because you might want to change the
subdomain detection. If you find it useful and fiddled around with it, please
let us know so we can enhance it.


== Install

    gem install sk_sdk

If you are using bundler add to Gemfile

  gem "sk_sdk"
  # or directly require used class
  gem "sk_sdk", :require => "sk_sdk/omni_auth/salesking"

== Usage

An initializers/omniauth.rb might look something like this:
  # if you copied the file into your lib/
  require File.expand_path('../../../lib/sk_auth', __FILE__)
  # or from gem
  require "sk_sdk/omni_auth/salesking"
  begin
    sk = YAML.load_file(File.join(Rails.root, 'config', 'salesking.yml'))
    sk = sk[Rails.env]
  rescue
    puts "Error reading config/salesking.yml please create and review this file"
  end

  Rails.application.config.middleware.use OmniAuth::Builder do
    provider :salesking, sk['key'], sk['secret'], sk['url']
  end


Copyright (c) 2011 Georg Leciejewski, released under the MIT license

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
sk_sdk-0.4.3 lib/sk_sdk/omni_auth/README.rdoc
sk_sdk-0.4.2 lib/sk_sdk/omni_auth/README.rdoc
sk_sdk-0.4.1 lib/sk_sdk/omni_auth/README.rdoc
sk_sdk-0.4.0 lib/sk_sdk/omni_auth/README.rdoc
sk_sdk-0.3.0 lib/sk_sdk/omni_auth/README.rdoc
sk_sdk-0.2.2 lib/sk_sdk/omni_auth/README.rdoc
sk_sdk-0.2.1 lib/sk_sdk/omni_auth/README.rdoc
sk_sdk-0.1.1 lib/sk_sdk/omni_auth/README.rdoc
sk_sdk-0.1.0 lib/sk_sdk/omni_auth/README.rdoc