Sha256: ca20891f911626fa868892b3755261f27387051db506a0b47ba0bdd6b3ab7220

Contents?: true

Size: 1.55 KB

Versions: 2

Compression:

Stored size: 1.55 KB

Contents

Omniauth-Matique
================
[![Gem Version](https://badge.fury.io/rb/omniauth-matique.svg)](https://badge.fury.io/rb/omniauth-matique)
[![Build Status](https://travis-ci.org/matique/omniauth-matique.png?branch=master)](https://travis-ci.org/matique/omniauth-matique)

# OmniAuth Matique Strategy

Strategy to authenticate with matique UG via OAuth2 in OmniAuth.

## Installation

Add to your `Gemfile`:

```ruby
gem 'omniauth-matique'
```

Then `bundle install`.

## Usage

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

```ruby
Rails.application.config.middleware.use OmniAuth::Builder do
  provider :matique, ENV["CLIENT_ID"], ENV["CLIENT_SECRET"]
end
OmniAuth.config.logger = Rails.logger
```

Here's an routing example for a Rails app (config/routes.rb):

```ruby
match '/auth/:provider/callback', to: 'sessions#create', via: [:get, :post]
get '/auth/failure', to: 'sessions#failure'

get '/auth/login', to: 'sessions#new', as: :login
get '/auth/logout', to: 'sessions#destroy', as: :logout
```

You must take care about (see also sample "app"):
- app/controllers/sessions_controller.rb
- config/initializers/omniauth.rb

You can now access the OmniAuth Matique URL: /auth/matique


## Credits

Inspiration from the web.
See also:

- http://intridea.github.io/omniauth/
- http://blog.joshsoftware.com/2010/12/16/multiple-applications-with-devise-omniauth-and-single-sign-on/
- http://codetheory.in/rails-devise-omniauth-sso/
- https://github.com/intridea/omniauth.git

Copyright (c) [Dittmar Krall], released under the MIT license.

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
omniauth-matique-0.1.2 README.md
omniauth-matique-0.1.1 README.md