0.0
Low commit activity in last 3 years
No release in over a year
Library for login mumuki requests
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies
 Project Readme

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:

  • login_methods
  • destroy_session_user_uid!, save_session_user_uid!, current_user_uid

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:

  • #login_provider
  • #login_provider_settings
  • #login_provider_object (but can be provided by Mumukit::Login::OrganizationHelpers)

user:

  • .for_profile

License

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