No commit activity in last 3 years
No release in over 3 years
HubIdentity is an authentication service which features various authentication methods for an applications users.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Runtime

~> 0.79.0
~> 6.1.3
 Project Readme

HubIdentityRuby

A Rails Engine designed to make implementing HubIdentity authentication easy and fast. In order to use this package you need to have an account with HubIdentity

Currently this is only for Hivelocity uses. If you have a commercial interest please contact the Package Manager Erin Boeger through linkedIn or Github or through Hivelocity.

Installation

Add this line to your application's Gemfile:

gem 'hub_identity_ruby'

And then execute:

$ bundle

Or install it yourself as:

$ gem install hub_identity_ruby

inside your ApplicationController:

include HubIdentityRuby::ControllerHelpers

inside your routes.rb mount the HubIdentity routes.

mount HubIdentityRuby::Engine => "/hub_identity_ruby"

This will add the following routes to your application:

  • sessions_new GET /sessions/new(.:format) hub_identity_ruby/sessions#new
  • sessions_create GET /sessions/create(.:format) hub_identity_ruby/sessions#create
  • sessions_destroy DELETE /sessions/destroy(.:format) hub_identity_ruby/sessions#destroy

Environmental Variables

set your public and private keys and HubIdentity url

HUBIDENTITY_PRIVATE_KEY="a private key from HubIdentity website"
HUBIDENTITY_PUBLIC_KEY="a public key from HubIdentity website"
HUBIDENTITY_URL="for production deployment defaults to staging server"

Currently the HUBIDENTITY_URL defaults to staging HubIdentity server.

Restricted routes

For authentication required (restricted) routes add the before_action helpers. for example:

before_action :authenticate_user!, only: [:page_1, :page_2]
before_action :set_current_user

use the before_action :authenticate_user! to restrict routes and require a user to authenticate. use the before_action :set_current_user helper to have an @current_user in your views to help with navigation.

License

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