mumuki / mumukit-login

Omniauth-based login library for Mumuki Platform
MIT License
1 stars 0 forks source link

Stories in Ready Build Status Code Climate Test Coverage

Mumukit::Login

Omniauth-based login library for Mumuki Platform

Core components

Helpers

Usage

Rails

# in initializers/omniauth.rb
Rails.application.config.middleware.use OmniAuth::Builder do
   Mumukit::Login.configure_omniauth! self
end

# in config/routes.rb
Rails.application.routes.draw do
  Mumukit::Login.configure_login_routes! self
end

# in app/controllers/login_controller.rb
class LoginController < ApplicationController
  Mumukit::Login.configure_login_controller! self

  def failure
      # define your failure login handler
  end
end

# in app/controller/application_controller.rb
class ApplicationController < ActionController::Base
  Mumukit::Login.configure_controller! self

  private

  def login_settings
    # define your login settings
  end
end

Customization

You can override the following methods:

Requirements

In order to properly use this gem, your organization and user objects - as defined by Mumukit::Platform - must implement some additional required methods:

organization:

user:

License

The gem is available as open source under the terms of the MIT License.