Sha256: 270d45270c4172195540364b8306ace721117744c0457120ad8d5747d6f3c81b
Contents?: true
Size: 1.66 KB
Versions: 1
Compression:
Stored size: 1.66 KB
Contents
# Gatepass Short description and motivation. ## Usage See the Installation section below. ## Installation Add this line to your application's Gemfile: ```ruby gem "gatepass" ``` And then execute: ```bash $ bundle ``` Or install it yourself as: ```bash $ gem install gatepass ``` Mount the engine with the following line in `config/routes.rb` : ``` mount Gatepass::Engine => '/gatepass' ``` Ensure you also have the root configured (Eg. `root 'home#index''`) for your Rails application. Modify the application controller to include the Gatepass module and add the authentication check: ``` class ApplicationController < ActionController::Base include Gatepass before_action :check_authenticated end ``` In `config/application.rb` , define the following configuration parameters: ``` config.ldap_server_hostname = 'myldap.com' config.ldap_server_port = 636 config.ldap_ca_cert = '/etc/path/ca.cert' config.ldap_base = 'DN=myldap,DN=com' ``` Run the migrations with: ``` rails gatepass:install:migrations rails db:migrate ``` Create an initial user account with: ``` $ rails c u1 = Gatepass::User.new u1.username = 'nitin' u1.password = 'green' u1.auth_type = 'local' u1.save ``` Login with the above account, and access the user account management page at: http://localhost:3000/gatepass/users ## Other Notes The User model has the fields: username:string auth_type:string password_digest:string username_mapping:string auth_type is `local` or `activedirectory`. Use a dummy password for activedirectory users. ## Contributing Create a pull request on GitHub. ## License The gem is available as open source under the terms of the [MIT License](https://opensource.org/licenses/MIT).
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
gatepass-0.1.1 | README.md |