GithubHelp home page GithubHelp logo

imclab / omniauth-yammer Goto Github PK

View Code? Open in Web Editor NEW

This project forked from le0pard/omniauth-yammer

0.0 2.0 0.0 72 KB

OmniAuth strategy for Yammer

Home Page: https://github.com/le0pard/omniauth-yammer

omniauth-yammer's Introduction

OmniAuth Yammer

This gem contains the Yammer strategy for OmniAuth 1.0.

Supports the OAuth 2.0 server-side flow. Read the Yammer docs for more details: https://developer.yammer.com/api/oauth2.html

Installing

Add to your Gemfile:

gem 'omniauth'
gem 'omniauth-yammer'

or even:

gem 'omniauth'
gem 'omniauth-yammer', :git => 'git://github.com/le0pard/omniauth-yammer.git'

Then bundle install.

Usage

OmniAuth::Strategies::Yammer is simply a Rack middleware. Read the OmniAuth 1.0 docs for detailed instructions: https://github.com/intridea/omniauth.

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

Rails.application.config.middleware.use OmniAuth::Builder do
  provider :yammer, ENV['YAMMER_KEY'], ENV['YAMMER_SECRET']
end

For changing default domain in gem (for dev or testing purpose) use YAMMER_DOMAIN environment variable:

ENV['YAMMER_DOMAIN'] = 'https://staging.yammer.com'

Devise

Add this line to devise config:

config.omniauth :yammer, "Consumer key", "Consumer secret"

If you have this error:

SSL_connect returned=1 errno=0 state=SSLv3 read server certificate B: certificate verify failed

Then you can fix this by setting valid cert:

wget http://www.cacert.org/certs/root.crt
cat root.crt >> lib/ca-bundle.crt

and edit devise config:

config.omniauth :yammer, "Consumer key", "Consumer secret", {:client_options => {:ssl => {:ca_file => "#{Rails.root}/lib/ca-bundle.crt" }}}

omniauth-yammer's People

Contributors

le0pard avatar

Watchers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.