devise_jwt_mehak 1.0.1 → 1.0.5

Sign up to get free protection for your applications and to get access to all the features.
Files changed (41) hide show
  1. checksums.yaml +4 -4
  2. data/config/application.rb +30 -0
  3. data/config/boot.rb +4 -0
  4. data/config/cable.yml +10 -0
  5. data/config/credentials.yml.enc +1 -0
  6. data/config/database.yml +36 -0
  7. data/config/environment.rb +5 -0
  8. data/config/environments/development.rb +76 -0
  9. data/config/environments/production.rb +120 -0
  10. data/config/environments/test.rb +60 -0
  11. data/config/initializers/application_controller_renderer.rb +8 -0
  12. data/config/initializers/assets.rb +14 -0
  13. data/config/initializers/backtrace_silencers.rb +8 -0
  14. data/config/initializers/content_security_policy.rb +30 -0
  15. data/config/initializers/cookies_serializer.rb +5 -0
  16. data/config/initializers/devise.rb +329 -0
  17. data/config/initializers/filter_parameter_logging.rb +6 -0
  18. data/config/initializers/inflections.rb +16 -0
  19. data/config/initializers/mime_types.rb +4 -0
  20. data/config/initializers/permissions_policy.rb +11 -0
  21. data/config/initializers/warden_auth.rb +11 -0
  22. data/config/initializers/wrap_parameters.rb +14 -0
  23. data/config/locales/devise.en.yml +65 -0
  24. data/config/locales/en.yml +33 -0
  25. data/config/master.key +1 -0
  26. data/config/puma.rb +43 -0
  27. data/config/routes.rb +40 -0
  28. data/config/spring.rb +6 -0
  29. data/config/storage.yml +34 -0
  30. data/config/webpack/development.js +5 -0
  31. data/config/webpack/environment.js +3 -0
  32. data/config/webpack/production.js +5 -0
  33. data/config/webpack/test.js +5 -0
  34. data/config/webpacker.yml +92 -0
  35. data/devise_jwt.gemspec +4 -3
  36. data/lib/devise_jwt/version.rb +3 -0
  37. data/lib/devise_jwt.rb +11 -0
  38. data/lib/generators/devise_jwt_mehak/service/USAGE +8 -0
  39. data/lib/generators/devise_jwt_mehak/service/service_generator.rb +22 -0
  40. data/lib/generators/devise_jwt_mehak/service/templates/service.erb +16 -0
  41. metadata +39 -1
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 37ef0cba2c5cf158b9dab47792872f1afbe341130c0e32dc5d5047a6b71f4c82
4
- data.tar.gz: dbe1323bbaefa593b77c00d090b2cda3628dd2b841d2c82cc617b30bed90dc67
3
+ metadata.gz: f1d5f807b0adf424481988daf68b36da5e31015c8d71567cab07372a93df5328
4
+ data.tar.gz: '0227090766d57445b3c3b75e4995a5fbe212368e6049510210c24499805b9429'
5
5
  SHA512:
6
- metadata.gz: 502079982f35a739e82e136f89d5da4cced36714df5c3f505b109a2ad33008a044a278561fcc82a33299d2fbb32bc4fb14984752c567092563691b08af22c0b1
7
- data.tar.gz: fe0b83c0cf918c313c100bb6314eb6cce86b420bc4a0a3aaea36a8b39a69d802ac2459085b59b987c63a9aa4b63006ab3b403209200d236eb90239530d99bee6
6
+ metadata.gz: 3f1d6a0ef9f090ae3ceefa2932fc9e050bd331c110911a426f0834b688b6e1e091596ca7b5557258422aac9c3b1536a77a6c744ed496731a7a41ec85d61d6857
7
+ data.tar.gz: 75870ac097a16e4ba06d9e2e08ed38371ce75b5aef86884291b15590726e4b5489aedfdd109e236ae4e13c1272432cf19b431bbf0e4e74741a9a849621a1aacd
@@ -0,0 +1,30 @@
1
+ require_relative "boot"
2
+
3
+ require "rails/all"
4
+
5
+ # Require the gems listed in Gemfile, including any gems
6
+ # you've limited to :test, :development, or :production.
7
+ Bundler.require(*Rails.groups)
8
+
9
+ module DeviseJwt
10
+ class Application < Rails::Application
11
+ # Initialize configuration defaults for originally generated Rails version.
12
+ config.load_defaults 6.1
13
+
14
+ config.generators do |g|
15
+ g.orm :active_record
16
+ g.template_engine :erb
17
+ g.test_framework :test_unit, fixture: false
18
+ g.stylesheets false
19
+ # g.helper :my_helper
20
+ end
21
+
22
+ # Configuration for the application, engines, and railties goes here.
23
+ #
24
+ # These settings can be overridden in specific environments using the files
25
+ # in config/environments, which are processed later.
26
+ #
27
+ # config.time_zone = "Central Time (US & Canada)"
28
+ # config.eager_load_paths << Rails.root.join("extras")
29
+ end
30
+ end
data/config/boot.rb ADDED
@@ -0,0 +1,4 @@
1
+ ENV['BUNDLE_GEMFILE'] ||= File.expand_path('../Gemfile', __dir__)
2
+
3
+ require "bundler/setup" # Set up gems listed in the Gemfile.
4
+ require "bootsnap/setup" # Speed up boot time by caching expensive operations.
data/config/cable.yml ADDED
@@ -0,0 +1,10 @@
1
+ development:
2
+ adapter: async
3
+
4
+ test:
5
+ adapter: test
6
+
7
+ production:
8
+ adapter: redis
9
+ url: <%= ENV.fetch("REDIS_URL") { "redis://localhost:6379/1" } %>
10
+ channel_prefix: devise_jwt_production
@@ -0,0 +1 @@
1
+ 3WKY037eO4E2cl4wL90yz1b1mwui26BPXHn2Rbi9yjygDzw8IWc8EEB2IkzO037x9eTDFxiMCzuom8r3SIe30FdozRw57lfMtDGuTxZaA0GUzYojmw8JUvJnYu/RdePEwK4dfBYl4n+EcuCpZ+6F4ydq/ZN8oCtXzUndypKw1wDQIoJ1HIy3y/NlbgeVNqbqvWYc2j3LfRj6KcuGAhwsrho2R5axgobNRIoIpI/mFlxiu+8JbRSIRuFHDlLx83ZUnid3XcOwrwCSO6eqN6t50JuNodOafp8lM1tKqEmUMDIGPs54lDDo6mDhTmtUA7YLC0FEMBiiYdXh0IrjT5tD6PZjoH/DJhw7Ickxu92U/KeM+pFiY9c9IKatCu0lfZUjToq/fmGi7OAtliipAmTM2WAAz45m78i8yeE7--TmEb0RKioXVItLB2--mDAzKS7K1clU3BTI6/ueiw==
@@ -0,0 +1,36 @@
1
+ default: &default
2
+ adapter: postgresql
3
+ encoding: unicode
4
+ pool: <%= ENV.fetch("RAILS_MAX_THREADS") { 5 } %>
5
+
6
+ development:
7
+ <<: *default
8
+ database: devise_development
9
+ username: mehak
10
+ password: Mehak@1234
11
+
12
+ test:
13
+ <<: *default
14
+ database: devise_test
15
+ username: mehak
16
+ password: Mehak@1234
17
+
18
+ # staging:
19
+ # <<: *default
20
+ # database: devise_staging
21
+ # username: pm_dashboard
22
+ # password: <%= ENV['PM_DASHBOARD_DATABASE_PASSWORD'] %>
23
+
24
+ # production:
25
+ # <<: *default
26
+ # database: devise_production
27
+ # username: pm_dashboard
28
+ # password: <%= ENV['PM_DASHBOARD_DATABASE_PASSWORD'] %>
29
+
30
+ # adapter: postgresql
31
+ # encoding: unicode
32
+ # database: pm_dashboard_production
33
+ # username: pm_dbadmin
34
+ # password: G266SD2376ilerBRbg085
35
+ # host: pm-dashboard.cuu7nf3bqiss.us-east-1.rds.amazonaws.com
36
+ # port: 5432
@@ -0,0 +1,5 @@
1
+ # Load the Rails application.
2
+ require_relative "application"
3
+
4
+ # Initialize the Rails application.
5
+ Rails.application.initialize!
@@ -0,0 +1,76 @@
1
+ require "active_support/core_ext/integer/time"
2
+
3
+ Rails.application.configure do
4
+ # Settings specified here will take precedence over those in config/application.rb.
5
+
6
+ # In the development environment your application's code is reloaded any time
7
+ # it changes. This slows down response time but is perfect for development
8
+ # since you don't have to restart the web server when you make code changes.
9
+ config.cache_classes = false
10
+
11
+ # Do not eager load code on boot.
12
+ config.eager_load = false
13
+
14
+ # Show full error reports.
15
+ config.consider_all_requests_local = true
16
+
17
+ # Enable/disable caching. By default caching is disabled.
18
+ # Run rails dev:cache to toggle caching.
19
+ if Rails.root.join('tmp', 'caching-dev.txt').exist?
20
+ config.action_controller.perform_caching = true
21
+ config.action_controller.enable_fragment_cache_logging = true
22
+
23
+ config.cache_store = :memory_store
24
+ config.public_file_server.headers = {
25
+ 'Cache-Control' => "public, max-age=#{2.days.to_i}"
26
+ }
27
+ else
28
+ config.action_controller.perform_caching = false
29
+
30
+ config.cache_store = :null_store
31
+ end
32
+
33
+ # Store uploaded files on the local file system (see config/storage.yml for options).
34
+ config.active_storage.service = :local
35
+
36
+ # Don't care if the mailer can't send.
37
+ config.action_mailer.raise_delivery_errors = false
38
+
39
+ config.action_mailer.perform_caching = false
40
+
41
+ # Print deprecation notices to the Rails logger.
42
+ config.active_support.deprecation = :log
43
+
44
+ # Raise exceptions for disallowed deprecations.
45
+ config.active_support.disallowed_deprecation = :raise
46
+
47
+ # Tell Active Support which deprecation messages to disallow.
48
+ config.active_support.disallowed_deprecation_warnings = []
49
+
50
+ # Raise an error on page load if there are pending migrations.
51
+ config.active_record.migration_error = :page_load
52
+
53
+ # Highlight code that triggered database queries in logs.
54
+ config.active_record.verbose_query_logs = true
55
+
56
+ # Debug mode disables concatenation and preprocessing of assets.
57
+ # This option may cause significant delays in view rendering with a large
58
+ # number of complex assets.
59
+ config.assets.debug = true
60
+
61
+ # Suppress logger output for asset requests.
62
+ config.assets.quiet = true
63
+
64
+ # Raises error for missing translations.
65
+ # config.i18n.raise_on_missing_translations = true
66
+
67
+ # Annotate rendered view with file names.
68
+ # config.action_view.annotate_rendered_view_with_filenames = true
69
+
70
+ # Use an evented file watcher to asynchronously detect changes in source code,
71
+ # routes, locales, etc. This feature depends on the listen gem.
72
+ config.file_watcher = ActiveSupport::EventedFileUpdateChecker
73
+
74
+ # Uncomment if you wish to allow Action Cable access from any origin.
75
+ # config.action_cable.disable_request_forgery_protection = true
76
+ end
@@ -0,0 +1,120 @@
1
+ require "active_support/core_ext/integer/time"
2
+
3
+ Rails.application.configure do
4
+ # Settings specified here will take precedence over those in config/application.rb.
5
+
6
+ # Code is not reloaded between requests.
7
+ config.cache_classes = true
8
+
9
+ # Eager load code on boot. This eager loads most of Rails and
10
+ # your application in memory, allowing both threaded web servers
11
+ # and those relying on copy on write to perform better.
12
+ # Rake tasks automatically ignore this option for performance.
13
+ config.eager_load = true
14
+
15
+ # Full error reports are disabled and caching is turned on.
16
+ config.consider_all_requests_local = false
17
+ config.action_controller.perform_caching = true
18
+
19
+ # Ensures that a master key has been made available in either ENV["RAILS_MASTER_KEY"]
20
+ # or in config/master.key. This key is used to decrypt credentials (and other encrypted files).
21
+ # config.require_master_key = true
22
+
23
+ # Disable serving static files from the `/public` folder by default since
24
+ # Apache or NGINX already handles this.
25
+ config.public_file_server.enabled = ENV['RAILS_SERVE_STATIC_FILES'].present?
26
+
27
+ # Compress CSS using a preprocessor.
28
+ # config.assets.css_compressor = :sass
29
+
30
+ # Do not fallback to assets pipeline if a precompiled asset is missed.
31
+ config.assets.compile = false
32
+
33
+ # Enable serving of images, stylesheets, and JavaScripts from an asset server.
34
+ # config.asset_host = 'http://assets.example.com'
35
+
36
+ # Specifies the header that your server uses for sending files.
37
+ # config.action_dispatch.x_sendfile_header = 'X-Sendfile' # for Apache
38
+ # config.action_dispatch.x_sendfile_header = 'X-Accel-Redirect' # for NGINX
39
+
40
+ # Store uploaded files on the local file system (see config/storage.yml for options).
41
+ config.active_storage.service = :local
42
+
43
+ # Mount Action Cable outside main process or domain.
44
+ # config.action_cable.mount_path = nil
45
+ # config.action_cable.url = 'wss://example.com/cable'
46
+ # config.action_cable.allowed_request_origins = [ 'http://example.com', /http:\/\/example.*/ ]
47
+
48
+ # Force all access to the app over SSL, use Strict-Transport-Security, and use secure cookies.
49
+ # config.force_ssl = true
50
+
51
+ # Include generic and useful information about system operation, but avoid logging too much
52
+ # information to avoid inadvertent exposure of personally identifiable information (PII).
53
+ config.log_level = :info
54
+
55
+ # Prepend all log lines with the following tags.
56
+ config.log_tags = [ :request_id ]
57
+
58
+ # Use a different cache store in production.
59
+ # config.cache_store = :mem_cache_store
60
+
61
+ # Use a real queuing backend for Active Job (and separate queues per environment).
62
+ # config.active_job.queue_adapter = :resque
63
+ # config.active_job.queue_name_prefix = "devise_jwt_production"
64
+
65
+ config.action_mailer.perform_caching = false
66
+
67
+ # Ignore bad email addresses and do not raise email delivery errors.
68
+ # Set this to true and configure the email server for immediate delivery to raise delivery errors.
69
+ # config.action_mailer.raise_delivery_errors = false
70
+
71
+ # Enable locale fallbacks for I18n (makes lookups for any locale fall back to
72
+ # the I18n.default_locale when a translation cannot be found).
73
+ config.i18n.fallbacks = true
74
+
75
+ # Send deprecation notices to registered listeners.
76
+ config.active_support.deprecation = :notify
77
+
78
+ # Log disallowed deprecations.
79
+ config.active_support.disallowed_deprecation = :log
80
+
81
+ # Tell Active Support which deprecation messages to disallow.
82
+ config.active_support.disallowed_deprecation_warnings = []
83
+
84
+ # Use default logging formatter so that PID and timestamp are not suppressed.
85
+ config.log_formatter = ::Logger::Formatter.new
86
+
87
+ # Use a different logger for distributed setups.
88
+ # require "syslog/logger"
89
+ # config.logger = ActiveSupport::TaggedLogging.new(Syslog::Logger.new 'app-name')
90
+
91
+ if ENV["RAILS_LOG_TO_STDOUT"].present?
92
+ logger = ActiveSupport::Logger.new(STDOUT)
93
+ logger.formatter = config.log_formatter
94
+ config.logger = ActiveSupport::TaggedLogging.new(logger)
95
+ end
96
+
97
+ # Do not dump schema after migrations.
98
+ config.active_record.dump_schema_after_migration = false
99
+
100
+ # Inserts middleware to perform automatic connection switching.
101
+ # The `database_selector` hash is used to pass options to the DatabaseSelector
102
+ # middleware. The `delay` is used to determine how long to wait after a write
103
+ # to send a subsequent read to the primary.
104
+ #
105
+ # The `database_resolver` class is used by the middleware to determine which
106
+ # database is appropriate to use based on the time delay.
107
+ #
108
+ # The `database_resolver_context` class is used by the middleware to set
109
+ # timestamps for the last write to the primary. The resolver uses the context
110
+ # class timestamps to determine how long to wait before reading from the
111
+ # replica.
112
+ #
113
+ # By default Rails will store a last write timestamp in the session. The
114
+ # DatabaseSelector middleware is designed as such you can define your own
115
+ # strategy for connection switching and pass that into the middleware through
116
+ # these configuration options.
117
+ # config.active_record.database_selector = { delay: 2.seconds }
118
+ # config.active_record.database_resolver = ActiveRecord::Middleware::DatabaseSelector::Resolver
119
+ # config.active_record.database_resolver_context = ActiveRecord::Middleware::DatabaseSelector::Resolver::Session
120
+ end
@@ -0,0 +1,60 @@
1
+ require "active_support/core_ext/integer/time"
2
+
3
+ # The test environment is used exclusively to run your application's
4
+ # test suite. You never need to work with it otherwise. Remember that
5
+ # your test database is "scratch space" for the test suite and is wiped
6
+ # and recreated between test runs. Don't rely on the data there!
7
+
8
+ Rails.application.configure do
9
+ # Settings specified here will take precedence over those in config/application.rb.
10
+
11
+ config.cache_classes = false
12
+ config.action_view.cache_template_loading = true
13
+
14
+ # Do not eager load code on boot. This avoids loading your whole application
15
+ # just for the purpose of running a single test. If you are using a tool that
16
+ # preloads Rails for running tests, you may have to set it to true.
17
+ config.eager_load = false
18
+
19
+ # Configure public file server for tests with Cache-Control for performance.
20
+ config.public_file_server.enabled = true
21
+ config.public_file_server.headers = {
22
+ 'Cache-Control' => "public, max-age=#{1.hour.to_i}"
23
+ }
24
+
25
+ # Show full error reports and disable caching.
26
+ config.consider_all_requests_local = true
27
+ config.action_controller.perform_caching = false
28
+ config.cache_store = :null_store
29
+
30
+ # Raise exceptions instead of rendering exception templates.
31
+ config.action_dispatch.show_exceptions = false
32
+
33
+ # Disable request forgery protection in test environment.
34
+ config.action_controller.allow_forgery_protection = false
35
+
36
+ # Store uploaded files on the local file system in a temporary directory.
37
+ config.active_storage.service = :test
38
+
39
+ config.action_mailer.perform_caching = false
40
+
41
+ # Tell Action Mailer not to deliver emails to the real world.
42
+ # The :test delivery method accumulates sent emails in the
43
+ # ActionMailer::Base.deliveries array.
44
+ config.action_mailer.delivery_method = :test
45
+
46
+ # Print deprecation notices to the stderr.
47
+ config.active_support.deprecation = :stderr
48
+
49
+ # Raise exceptions for disallowed deprecations.
50
+ config.active_support.disallowed_deprecation = :raise
51
+
52
+ # Tell Active Support which deprecation messages to disallow.
53
+ config.active_support.disallowed_deprecation_warnings = []
54
+
55
+ # Raises error for missing translations.
56
+ # config.i18n.raise_on_missing_translations = true
57
+
58
+ # Annotate rendered view with file names.
59
+ # config.action_view.annotate_rendered_view_with_filenames = true
60
+ end
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # ActiveSupport::Reloader.to_prepare do
4
+ # ApplicationController.renderer.defaults.merge!(
5
+ # http_host: 'example.org',
6
+ # https: false
7
+ # )
8
+ # end
@@ -0,0 +1,14 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Version of your assets, change this if you want to expire all your assets.
4
+ Rails.application.config.assets.version = '1.0'
5
+
6
+ # Add additional assets to the asset load path.
7
+ # Rails.application.config.assets.paths << Emoji.images_path
8
+ # Add Yarn node_modules folder to the asset load path.
9
+ Rails.application.config.assets.paths << Rails.root.join('node_modules')
10
+
11
+ # Precompile additional assets.
12
+ # application.js, application.css, and all non-JS/CSS in the app/assets
13
+ # folder are already added.
14
+ # Rails.application.config.assets.precompile += %w( admin.js admin.css )
@@ -0,0 +1,8 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # You can add backtrace silencers for libraries that you're using but don't wish to see in your backtraces.
4
+ # Rails.backtrace_cleaner.add_silencer { |line| /my_noisy_library/.match?(line) }
5
+
6
+ # You can also remove all the silencers if you're trying to debug a problem that might stem from framework code
7
+ # by setting BACKTRACE=1 before calling your invocation, like "BACKTRACE=1 ./bin/rails runner 'MyClass.perform'".
8
+ Rails.backtrace_cleaner.remove_silencers! if ENV["BACKTRACE"]
@@ -0,0 +1,30 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Define an application-wide content security policy
4
+ # For further information see the following documentation
5
+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy
6
+
7
+ # Rails.application.config.content_security_policy do |policy|
8
+ # policy.default_src :self, :https
9
+ # policy.font_src :self, :https, :data
10
+ # policy.img_src :self, :https, :data
11
+ # policy.object_src :none
12
+ # policy.script_src :self, :https
13
+ # policy.style_src :self, :https
14
+ # # If you are using webpack-dev-server then specify webpack-dev-server host
15
+ # policy.connect_src :self, :https, "http://localhost:3035", "ws://localhost:3035" if Rails.env.development?
16
+
17
+ # # Specify URI for violation reports
18
+ # # policy.report_uri "/csp-violation-report-endpoint"
19
+ # end
20
+
21
+ # If you are using UJS then enable automatic nonce generation
22
+ # Rails.application.config.content_security_policy_nonce_generator = -> request { SecureRandom.base64(16) }
23
+
24
+ # Set the nonce only to specific directives
25
+ # Rails.application.config.content_security_policy_nonce_directives = %w(script-src)
26
+
27
+ # Report CSP violations to a specified URI
28
+ # For further information see the following documentation:
29
+ # https://developer.mozilla.org/en-US/docs/Web/HTTP/Headers/Content-Security-Policy-Report-Only
30
+ # Rails.application.config.content_security_policy_report_only = true
@@ -0,0 +1,5 @@
1
+ # Be sure to restart your server when you modify this file.
2
+
3
+ # Specify a serializer for the signed and encrypted cookie jars.
4
+ # Valid options are :json, :marshal, and :hybrid.
5
+ Rails.application.config.action_dispatch.cookies_serializer = :json