Sha256: e4f08e00df288c75e3d7327ed960b2b8c49d76028ec08b3ae113fa657904d4fb

Contents?: true

Size: 409 Bytes

Versions: 4

Compression:

Stored size: 409 Bytes

Contents

# frozen_string_literal: true

module RailsBase::Mfa
  MFA_DECISIONS = [
    OTP = :otp,
    SMS = :sms,
    NONE = :none
  ]

  def self.mfa_link(mfa:, mfa_event:)
    case mfa
    when OTP
      { method: :get, link: RailsBase.url_routes.mfa_with_event_path(mfa_event:, type: mfa) }
    when SMS
      { method: :post, link: RailsBase.url_routes.sms_validate_send_event_path(mfa_event:) }
    end
  end
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
rails_base-0.82.0 app/services/rails_base/mfa.rb
rails_base-0.81.1 app/services/rails_base/mfa.rb
rails_base-0.81.0 app/services/rails_base/mfa.rb
rails_base-0.80.0 app/services/rails_base/mfa.rb