Sha256: 78493627bf3da2171c6b02a209de57ddbbe86b80b11a3a63bbdd2f11a53bb19b

Contents?: true

Size: 511 Bytes

Versions: 13

Compression:

Stored size: 511 Bytes

Contents

# frozen_string_literal: true
require_dependency "think_feel_do_engine/application_controller"

module ThinkFeelDoEngine
  # Calculate the bits of entropy in a password.
  class PasswordEntropyBitsController < ApplicationController
    def show
      validator = PasswordValidator
                  .new(
                    password: params[:password],
                    password_token: params[:reset_password_token]
                  )
      render json: { bits: validator.entropy_value }
    end
  end
end

Version data entries

13 entries across 13 versions & 1 rubygems

Version Path
think_feel_do_engine-3.22.9 app/controllers/think_feel_do_engine/password_entropy_bits_controller.rb
think_feel_do_engine-3.22.8 app/controllers/think_feel_do_engine/password_entropy_bits_controller.rb
think_feel_do_engine-3.22.7 app/controllers/think_feel_do_engine/password_entropy_bits_controller.rb
think_feel_do_engine-3.22.6 app/controllers/think_feel_do_engine/password_entropy_bits_controller.rb
think_feel_do_engine-3.22.5 app/controllers/think_feel_do_engine/password_entropy_bits_controller.rb
think_feel_do_engine-3.22.4 app/controllers/think_feel_do_engine/password_entropy_bits_controller.rb
think_feel_do_engine-3.22.2 app/controllers/think_feel_do_engine/password_entropy_bits_controller.rb
think_feel_do_engine-3.22.1 app/controllers/think_feel_do_engine/password_entropy_bits_controller.rb
think_feel_do_engine-3.22.0 app/controllers/think_feel_do_engine/password_entropy_bits_controller.rb
think_feel_do_engine-3.21.2 app/controllers/think_feel_do_engine/password_entropy_bits_controller.rb
think_feel_do_engine-3.21.1 app/controllers/think_feel_do_engine/password_entropy_bits_controller.rb
think_feel_do_engine-3.21.0 app/controllers/think_feel_do_engine/password_entropy_bits_controller.rb
think_feel_do_engine-3.20.1 app/controllers/think_feel_do_engine/password_entropy_bits_controller.rb