class Locked::Commands::Authenticate

Public Class Methods

new(context) click to toggle source
# File lib/locked/commands/authenticate.rb, line 6
def initialize(context)
  @context = context
end

Public Instance Methods

build(options = {}) click to toggle source
# File lib/locked/commands/authenticate.rb, line 10
def build(options = {})
  Locked::Validators::Present.call(options, %i[event])
  context = Locked::Context::Merger.call(@context, options[:context])
  context = Locked::Context::Sanitizer.call(context)

  Locked::Command.new(
    'authenticate',
    options.merge(context: context),
    :post
  )
end