jwt_keeper 3.0.0 → 3.0.1

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA1:
3
- metadata.gz: 82b55239d3d3c73d4308ffe4deae76f9946c5f69
4
- data.tar.gz: 524f61adf98731f7c9b8a23d54188c86d433b70e
3
+ metadata.gz: 3d622a17d010fc9b106c161c42b90a4b3f8f1c05
4
+ data.tar.gz: 45467b7f357ad75e985b1b74297b5948cb2964d2
5
5
  SHA512:
6
- metadata.gz: be39c5cf7875634fb3140d6b76e78bbc46b9c3978799e3e9cf2bc394de49c7f814052e7bdfddad25c5fa1497a84b9de6db89b41ba098207b76f374038b0fa65e
7
- data.tar.gz: f8903ede2c42bee6eb3135d14d3b98ee22cf4e1dd8a1e818bd4c6d3be5ad470e5304e50515c59287af1e5194e05718b29a4d7899cceb675c72b9f66e32fad42a
6
+ metadata.gz: c87fbde489f9aace5c0bf65ae997b65d80b984bcd860986ed04bac9cece93b955b66bfa3bbca70dea29f1fb08dfb099cfdb1061f573e74cd63e66bf065eeaf7b
7
+ data.tar.gz: c5c28a26779d3c539c8dc63f6e5ba4636b5d82c2016cd1c2d7aa81526a498fec23aac300d4157e7c79ff5da724fd548dfd731bf43739fd695d75e24c095d092f
data/README.md CHANGED
@@ -8,7 +8,7 @@
8
8
  An managing interface layer for handling the creation and validation of JWTs.
9
9
 
10
10
  ## Setup
11
- - Add `gem 'jwt_keeper', '~> 3.0'` to Gemfile
11
+ - Add `gem 'jwt_keeper'` to Gemfile
12
12
  - Run `rails generate keeper:install`
13
13
  - Configure `config/initializers/jwt_keeper.rb`
14
14
  - Done
@@ -28,13 +28,15 @@ raw_token_string = token.to_jwt
28
28
  ```
29
29
 
30
30
  ## Rails Usage
31
- The designed rails token flow is to receive and respond to requests with the token being present in the `Authorization` part of the header. This is to allow us to seamlessly rotate the tokens on the fly without having to rebuff the request as part of the user flow. Automatic rotation happens as part of the `require_authentication` action, meaning that you will always get the latest token data as
32
- created by `generate_claims` in your controllers. This new token is added to the response with the `respond_with_authentication` action.
31
+ The designed rails token flow is to receive and respond to requests with the token being present in the `Authorization` part of the header. This is to allow us to seamlessly rotate the tokens on the fly without having to rebuff the request as part of the user flow. Automatic rotation happens as part of the `require_authentication` action, meaning that you will always get the latest token data as created by `generate_claims` in your controllers. This new token is added to the response with the `write_authentication_token` action.
32
+
33
+ ```bash
34
+ rake generate jwt_keeper:install
35
+ ```
33
36
 
34
37
  ```ruby
35
38
  class ApplicationController < ActionController::Base
36
39
  before_action :require_authentication
37
- after_action :respond_with_authentication
38
40
 
39
41
  def not_authenticated
40
42
  # Overload to return status 401
@@ -46,7 +48,7 @@ class ApplicationController < ActionController::Base
46
48
 
47
49
  def regenerate_claims(old_token)
48
50
  # Overload to update claims on automatic rotation.
49
- current_user = User.find(authentication_token.claims[:uid])
51
+ current_user = User.find(old_token.claims[:uid])
50
52
  { uid: current_user.id, usn: current_user.email }
51
53
  end
52
54
  end
@@ -55,22 +57,25 @@ end
55
57
  ```ruby
56
58
  class SessionsController < ApplicationController
57
59
  skip_before_action :require_authentication, only: :create
58
- skip_after_action :respond_with_authentication, only: :destroy
59
60
 
60
61
  # POST /sessions
61
62
  def create
62
- authentication_token = JWTKeeper::Token.create({ uid: @user.id, usn: @user.email })
63
+ token = JWTKeeper::Token.create(uid: @user.id, usn: @user.email)
64
+ write_authentication_token(token)
63
65
  end
64
66
 
65
67
  # PATCH/PUT /sessions
66
68
  def update
67
- authentication_token = request_token.rotate(generate_claims)
69
+ token = read_authentication_token
70
+ token.rotate
71
+ write_authentication_token(token)
68
72
  end
69
73
 
70
74
  # DELETE /sessions
71
75
  def destroy
72
- request_token.revoke
73
- authentication_token = nil
76
+ token = read_authentication_token
77
+ token.revoke
78
+ clear_authentication_token
74
79
  end
75
80
  ```
76
81
 
data/jwt_keeper.gemspec CHANGED
@@ -9,11 +9,11 @@ Gem::Specification.new do |spec|
9
9
  spec.authors = ['David Rivera', 'Zane Wolfgang Pickett']
10
10
  spec.email = ['david.r.rivera193@gmail.com', 'sirwolfgang@users.noreply.github.com']
11
11
  spec.summary = 'JWT for Rails made easy'
12
- spec.description = 'It is a keeper'
12
+ spec.description = 'A managing interface layer for handling the creation and validation of JWTs'
13
13
  spec.homepage = 'https://github.com/sirwolfgang/jwt_keeper'
14
14
  spec.license = 'MIT'
15
15
 
16
- spec.files = `git ls-files -z`.split("\x0")
16
+ spec.files = `git ls-files -z`.split("\x0").reject { |f| f.match(/^example\//) }
17
17
  spec.executables = spec.files.grep(%r{^bin/}) { |f| File.basename(f) }
18
18
  spec.test_files = spec.files.grep(%r{^(test|spec|features)/})
19
19
  spec.require_paths = ['lib']
@@ -1,6 +1,6 @@
1
1
  require 'rails/generators/base'
2
2
 
3
- module JWTKeeper
3
+ module JwtKeeper
4
4
  class InstallGenerator < Rails::Generators::Base
5
5
  source_root File.expand_path('../../../templates', __FILE__)
6
6
 
@@ -1,4 +1,4 @@
1
1
  # Gem Version
2
2
  module JWTKeeper
3
- VERSION = '3.0.0'.freeze
3
+ VERSION = '3.0.1'.freeze
4
4
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: jwt_keeper
3
3
  version: !ruby/object:Gem::Version
4
- version: 3.0.0
4
+ version: 3.0.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - David Rivera
@@ -9,7 +9,7 @@ authors:
9
9
  autorequire:
10
10
  bindir: bin
11
11
  cert_chain: []
12
- date: 2016-04-25 00:00:00.000000000 Z
12
+ date: 2016-04-27 00:00:00.000000000 Z
13
13
  dependencies:
14
14
  - !ruby/object:Gem::Dependency
15
15
  name: bundler
@@ -193,7 +193,8 @@ dependencies:
193
193
  - - "~>"
194
194
  - !ruby/object:Gem::Version
195
195
  version: '1.5'
196
- description: It is a keeper
196
+ description: A managing interface layer for handling the creation and validation of
197
+ JWTs
197
198
  email:
198
199
  - david.r.rivera193@gmail.com
199
200
  - sirwolfgang@users.noreply.github.com
@@ -212,34 +213,6 @@ files:
212
213
  - Rakefile
213
214
  - docker-compose.yml
214
215
  - example.env
215
- - example/.gitignore
216
- - example/Gemfile
217
- - example/Rakefile
218
- - example/app/controllers/application_controller.rb
219
- - example/app/controllers/sessions_controller.rb
220
- - example/bin/bundle
221
- - example/bin/rails
222
- - example/bin/rake
223
- - example/bin/setup
224
- - example/bin/spring
225
- - example/config.ru
226
- - example/config/application.rb
227
- - example/config/boot.rb
228
- - example/config/environment.rb
229
- - example/config/environments/development.rb
230
- - example/config/environments/production.rb
231
- - example/config/environments/test.rb
232
- - example/config/initializers/backtrace_silencer.rb
233
- - example/config/initializers/cookies_serializer.rb
234
- - example/config/initializers/filter_parameter_logging.rb
235
- - example/config/initializers/jwt_keeper.rb
236
- - example/config/initializers/session_store.rb
237
- - example/config/initializers/wrap_parameters.rb
238
- - example/config/locales/en.yml
239
- - example/config/routes.rb
240
- - example/config/secrets.yml
241
- - example/example.env
242
- - example/log/.keep
243
216
  - jwt_keeper.gemspec
244
217
  - lib/generators/jwt_keeper/install/install_generator.rb
245
218
  - lib/generators/templates/jwt_keeper.rb
data/example/.gitignore DELETED
@@ -1,15 +0,0 @@
1
- # See https://help.github.com/articles/ignoring-files for more about ignoring files.
2
- #
3
- # If you find yourself ignoring temporary files generated by your text editor
4
- # or operating system, you probably want to add a global ignore instead:
5
- # git config --global core.excludesfile '~/.gitignore_global'
6
-
7
- # Ignore bundler config.
8
- /.bundle
9
-
10
- # Ignore all logfiles and tempfiles.
11
- /log/*
12
- !/log/.keep
13
- /tmp
14
-
15
- .env
data/example/Gemfile DELETED
@@ -1,15 +0,0 @@
1
- source 'https://rubygems.org'
2
-
3
- gem 'rails', '4.2.6'
4
- gem 'puma'
5
-
6
- gem 'jwt_keeper', path: '..'
7
-
8
- group :development, :test do
9
- gem 'dotenv-rails'
10
-
11
- gem 'pry'
12
- gem 'pry-stack_explorer'
13
- gem 'pry-rescue'
14
- gem 'pry-byebug'
15
- end
data/example/Rakefile DELETED
@@ -1,6 +0,0 @@
1
- # Add your own tasks in files placed in lib/tasks ending in .rake,
2
- # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake.
3
-
4
- require File.expand_path('../config/application', __FILE__)
5
-
6
- Rails.application.load_tasks
@@ -1,27 +0,0 @@
1
- class ApplicationController < ActionController::Base
2
- protect_from_forgery with: :exception
3
- skip_before_action :verify_authenticity_token
4
-
5
- before_action :default_format_json
6
- before_action :require_authentication
7
-
8
- private
9
-
10
- def default_format_json
11
- request.format ||= 'json'
12
- end
13
-
14
- def not_authenticated
15
- respond_to do |format|
16
- format.json { head :unauthorized }
17
- end
18
- end
19
-
20
- def authenticated(decoded_token)
21
- @current_user_id = decoded_token.claims[:uid] # Hold off on database calls until necessary
22
- end
23
-
24
- def current_user
25
- @current_user ||= { id: @current_user_id }
26
- end
27
- end
@@ -1,52 +0,0 @@
1
- class SessionsController < ApplicationController
2
- skip_before_action :require_authentication, only: :create
3
-
4
- # GET /session
5
- def show
6
- token = read_authentication_token
7
-
8
- respond_to do |format|
9
- format.json { render json: token }
10
- end
11
- end
12
-
13
- # POST /session
14
- def create
15
- @user = { id: 1 }
16
-
17
- respond_to do |format|
18
- if @user
19
- write_authentication_token(JWTKeeper::Token.create(uid: @user[:id]))
20
- format.json { head :created }
21
- else
22
- clear_authentication_token
23
- format.json { head :unauthorized }
24
- end
25
- end
26
- end
27
-
28
- # PATCH/PUT /session
29
- def update
30
- token = read_authentication_token
31
-
32
- respond_to do |format|
33
- if token.rotate
34
- write_authentication_token(token)
35
- format.json { head :created }
36
- else
37
- clear_authentication_token
38
- format.json { head :unauthorized }
39
- end
40
- end
41
- end
42
-
43
- # DELETE /session
44
- def destroy
45
- read_authentication_token.revoke
46
-
47
- respond_to do |format|
48
- clear_authentication_token
49
- format.json { head :no_content }
50
- end
51
- end
52
- end
data/example/bin/bundle DELETED
@@ -1,3 +0,0 @@
1
- #!/usr/bin/env ruby
2
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
3
- load Gem.bin_path('bundler', 'bundle')
data/example/bin/rails DELETED
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env ruby
2
- begin
3
- load File.expand_path('../spring', __FILE__)
4
- rescue LoadError => e
5
- raise unless e.message.include?('spring')
6
- end
7
- APP_PATH = File.expand_path('../../config/application', __FILE__)
8
- require_relative '../config/boot'
9
- require 'rails/commands'
data/example/bin/rake DELETED
@@ -1,9 +0,0 @@
1
- #!/usr/bin/env ruby
2
- begin
3
- load File.expand_path('../spring', __FILE__)
4
- rescue LoadError => e
5
- raise unless e.message.include?('spring')
6
- end
7
- require_relative '../config/boot'
8
- require 'rake'
9
- Rake.application.run
data/example/bin/setup DELETED
@@ -1,29 +0,0 @@
1
- #!/usr/bin/env ruby
2
- require 'pathname'
3
-
4
- # path to your application root.
5
- APP_ROOT = Pathname.new File.expand_path('../../', __FILE__)
6
-
7
- Dir.chdir APP_ROOT do
8
- # This script is a starting point to setup your application.
9
- # Add necessary setup steps to this file:
10
-
11
- puts '== Installing dependencies =='
12
- system 'gem install bundler --conservative'
13
- system 'bundle check || bundle install'
14
-
15
- # puts "\n== Copying sample files =="
16
- # unless File.exist?("config/database.yml")
17
- # system "cp config/database.yml.sample config/database.yml"
18
- # end
19
-
20
- puts "\n== Preparing database =="
21
- system 'bin/rake db:setup'
22
-
23
- puts "\n== Removing old logs and tempfiles =="
24
- system 'rm -f log/*'
25
- system 'rm -rf tmp/cache'
26
-
27
- puts "\n== Restarting application server =="
28
- system 'touch tmp/restart.txt'
29
- end
data/example/bin/spring DELETED
@@ -1,15 +0,0 @@
1
- #!/usr/bin/env ruby
2
-
3
- # This file loads spring without using Bundler, in order to be fast.
4
- # It gets overwritten when you run the `spring binstub` command.
5
-
6
- unless defined?(Spring)
7
- require 'rubygems'
8
- require 'bundler'
9
-
10
- if (match = Bundler.default_lockfile.read.match(/^GEM$.*?^ (?: )*spring \((.*?)\)$.*?^$/m))
11
- Gem.paths = { 'GEM_PATH' => [Bundler.bundle_path.to_s, *Gem.path].uniq.join(Gem.path_separator) }
12
- gem 'spring', match[1]
13
- require 'spring/binstub'
14
- end
15
- end
@@ -1,32 +0,0 @@
1
- require File.expand_path('../boot', __FILE__)
2
-
3
- require 'rails'
4
- # Pick the frameworks you want:
5
- # require "active_model/railtie"
6
- # require "active_job/railtie"
7
- # require "active_record/railtie"
8
- require 'action_controller/railtie'
9
- # require "action_mailer/railtie"
10
- require 'action_view/railtie'
11
- # require "sprockets/railtie"
12
- # require "rails/test_unit/railtie"
13
-
14
- # Require the gems listed in Gemfile, including any gems
15
- # you've limited to :test, :development, or :production.
16
- Bundler.require(*Rails.groups)
17
-
18
- module Example
19
- class Application < Rails::Application
20
- # Settings in config/environments/* take precedence over those specified here.
21
- # Application configuration should go into files in config/initializers
22
- # -- all .rb files in that directory are automatically loaded.
23
-
24
- # Set Time.zone default to the specified zone and make Active Record auto-convert to this zone.
25
- # Run "rake -D time" for a list of tasks for finding time zone names. Default is UTC.
26
- # config.time_zone = 'Central Time (US & Canada)'
27
-
28
- # The default locale is :en and all translations from config/locales/*.rb,yml are auto loaded.
29
- # config.i18n.load_path += Dir[Rails.root.join('my', 'locales', '*.{rb,yml}').to_s]
30
- # config.i18n.default_locale = :de
31
- end
32
- end
@@ -1,3 +0,0 @@
1
- ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../../Gemfile', __FILE__)
2
-
3
- require 'bundler/setup' # Set up gems listed in the Gemfile.
@@ -1,5 +0,0 @@
1
- # Load the Rails application.
2
- require File.expand_path('../application', __FILE__)
3
-
4
- # Initialize the Rails application.
5
- Rails.application.initialize!
@@ -1,24 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # In the development environment your application's code is reloaded on
5
- # every request. This slows down response time but is perfect for development
6
- # since you don't have to restart the web server when you make code changes.
7
- config.cache_classes = false
8
-
9
- # Do not eager load code on boot.
10
- config.eager_load = false
11
-
12
- # Show full error reports and disable caching.
13
- config.consider_all_requests_local = true
14
- config.action_controller.perform_caching = false
15
-
16
- # Don't care if the mailer can't send.
17
- # config.action_mailer.raise_delivery_errors = false
18
-
19
- # Print deprecation notices to the Rails logger.
20
- config.active_support.deprecation = :log
21
-
22
- # Raises error for missing translations
23
- # config.action_view.raise_on_missing_translations = true
24
- end
@@ -1,63 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # Code is not reloaded between requests.
5
- config.cache_classes = true
6
-
7
- # Eager load code on boot. This eager loads most of Rails and
8
- # your application in memory, allowing both threaded web servers
9
- # and those relying on copy on write to perform better.
10
- # Rake tasks automatically ignore this option for performance.
11
- config.eager_load = true
12
-
13
- # Full error reports are disabled and caching is turned on.
14
- config.consider_all_requests_local = false
15
- config.action_controller.perform_caching = true
16
-
17
- # Enable Rack::Cache to put a simple HTTP cache in front of your application
18
- # Add `rack-cache` to your Gemfile before enabling this.
19
- # For large-scale production use, consider using a caching reverse proxy like
20
- # NGINX, varnish or squid.
21
- # config.action_dispatch.rack_cache = true
22
-
23
- # Disable serving static files from the `/public` folder by default since
24
- # Apache or NGINX already handles this.
25
- config.serve_static_files = ENV['RAILS_SERVE_STATIC_FILES'].present?
26
-
27
- # Specifies the header that your server uses for sending files.
28
- # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
29
- # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
30
-
31
- # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
32
- # config.force_ssl = true
33
-
34
- # Use the lowest log level to ensure availability of diagnostic information
35
- # when problems arise.
36
- config.log_level = :debug
37
-
38
- # Prepend all log lines with the following tags.
39
- # config.log_tags = [ :subdomain, :uuid ]
40
-
41
- # Use a different logger for distributed setups.
42
- # config.logger = ActiveSupport::TaggedLogging.new(SyslogLogger.new)
43
-
44
- # Use a different cache store in production.
45
- # config.cache_store = :mem_cache_store
46
-
47
- # Enable serving of images, stylesheets, and JavaScripts from an asset server.
48
- # config.action_controller.asset_host = 'http://assets.example.com'
49
-
50
- # Ignore bad email addresses and do not raise email delivery errors.
51
- # Set this to true and configure the email server for immediate delivery to raise delivery errors.
52
- # config.action_mailer.raise_delivery_errors = false
53
-
54
- # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
55
- # the I18n.default_locale when a translation cannot be found).
56
- config.i18n.fallbacks = true
57
-
58
- # Send deprecation notices to registered listeners.
59
- config.active_support.deprecation = :notify
60
-
61
- # Use default logging formatter so that PID and timestamp are not suppressed.
62
- config.log_formatter = ::Logger::Formatter.new
63
- end
@@ -1,42 +0,0 @@
1
- Rails.application.configure do
2
- # Settings specified here will take precedence over those in config/application.rb.
3
-
4
- # The test environment is used exclusively to run your application's
5
- # test suite. You never need to work with it otherwise. Remember that
6
- # your test database is "scratch space" for the test suite and is wiped
7
- # and recreated between test runs. Don't rely on the data there!
8
- config.cache_classes = true
9
-
10
- # Do not eager load code on boot. This avoids loading your whole application
11
- # just for the purpose of running a single test. If you are using a tool that
12
- # preloads Rails for running tests, you may have to set it to true.
13
- config.eager_load = false
14
-
15
- # Configure static file server for tests with Cache-Control for performance.
16
- config.serve_static_files = true
17
- config.static_cache_control = 'public, max-age=3600'
18
-
19
- # Show full error reports and disable caching.
20
- config.consider_all_requests_local = true
21
- config.action_controller.perform_caching = false
22
-
23
- # Raise exceptions instead of rendering exception templates.
24
- config.action_dispatch.show_exceptions = false
25
-
26
- # Disable request forgery protection in test environment.
27
- config.action_controller.allow_forgery_protection = false
28
-
29
- # Tell Action Mailer not to deliver emails to the real world.
30
- # The :test delivery method accumulates sent emails in the
31
- # ActionMailer::Base.deliveries array.
32
- # config.action_mailer.delivery_method = :test
33
-
34
- # Randomize the order test cases are executed.
35
- config.active_support.test_order = :random
36
-
37
- # Print deprecation notices to the stderr.
38
- config.active_support.deprecation = :stderr
39
-
40
- # Raises error for missing translations
41
- # config.action_view.raise_on_missing_translations = true
42
- end
@@ -1 +0,0 @@
1
- Rails.backtrace_cleaner.remove_silencers!
@@ -1,3 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- Rails.application.config.action_dispatch.cookies_serializer = :json
@@ -1,4 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Configure sensitive parameters which will be filtered from the log file.
4
- Rails.application.config.filter_parameters += [:password]
@@ -1,11 +0,0 @@
1
- JWTKeeper.configure do |config|
2
- config.expiry = 1.hour
3
- config.algorithm = 'HS512'
4
- config.secret = 'secret'
5
- config.issuer = '.localhost'
6
- config.audience = 'localhost'
7
- config.redis_connection = Redis.new(url: ENV['REDIS_URL'])
8
- config.version = 1
9
- config.cookie_lock = true
10
- config.cookie_secure = !(Rails.env.test? || Rails.env.development?)
11
- end
@@ -1,3 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- Rails.application.config.session_store :cookie_store, key: '_example_session'
@@ -1,9 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # This file contains settings for ActionController::ParamsWrapper which
4
- # is enabled by default.
5
-
6
- # Enable parameter wrapping for JSON. You can disable this by setting :format to an empty array.
7
- ActiveSupport.on_load(:action_controller) do
8
- wrap_parameters format: [:json] if respond_to?(:wrap_parameters)
9
- end
@@ -1,23 +0,0 @@
1
- # Files in the config/locales directory are used for internationalization
2
- # and are automatically loaded by Rails. If you want to use locales other
3
- # than English, add the necessary files in this directory.
4
- #
5
- # To use the locales, use `I18n.t`:
6
- #
7
- # I18n.t 'hello'
8
- #
9
- # In views, this is aliased to just `t`:
10
- #
11
- # <%= t('hello') %>
12
- #
13
- # To use a different locale, set it with `I18n.locale`:
14
- #
15
- # I18n.locale = :es
16
- #
17
- # This would use the information in config/locales/es.yml.
18
- #
19
- # To learn more, please read the Rails Internationalization guide
20
- # available at http://guides.rubyonrails.org/i18n.html.
21
-
22
- en:
23
- hello: "Hello world"
@@ -1,3 +0,0 @@
1
- Rails.application.routes.draw do
2
- resource :session, only: [:show, :create, :update, :destroy]
3
- end
@@ -1,22 +0,0 @@
1
- # Be sure to restart your server when you modify this file.
2
-
3
- # Your secret key is used for verifying the integrity of signed cookies.
4
- # If you change this key, all old signed cookies will become invalid!
5
-
6
- # Make sure the secret is at least 30 characters and all random,
7
- # no regular words or you'll be exposed to dictionary attacks.
8
- # You can use `rake secret` to generate a secure secret key.
9
-
10
- # Make sure the secrets in this file are kept private
11
- # if you're sharing your code publicly.
12
-
13
- development:
14
- secret_key_base: 82e9f5f97a6b624896c35b930acb75d5d5d9df9aa363a21b4173e8a370480ffd7f329a280223a22f03fc07afd2d28c15fae09087eef781506ffea4954e16e12f
15
-
16
- test:
17
- secret_key_base: 516e709c30b7198b27d1b2c724e6eaffb13ac2ef0b7d22da67771afdf36f0c6d995e788d12e1da042e739be29d4b2c29ced96d6153f0ad296749570689d9bb4e
18
-
19
- # Do not keep production secrets in the repository,
20
- # instead read values from the environment.
21
- production:
22
- secret_key_base: <%= ENV["SECRET_KEY_BASE"] %>
data/example/config.ru DELETED
@@ -1,4 +0,0 @@
1
- # This file is used by Rack-based servers to start the application.
2
-
3
- require ::File.expand_path('../config/environment', __FILE__)
4
- run Rails.application
data/example/example.env DELETED
@@ -1 +0,0 @@
1
- REDIS_URL=redis://:password@localhost:port
data/example/log/.keep DELETED
File without changes