Class: Castle::Commands::Authenticate
- Inherits:
-
Object
- Object
- Castle::Commands::Authenticate
- Defined in:
- lib/castle/commands/authenticate.rb
Instance Method Summary collapse
- #build(options = {}) ⇒ Object
-
#initialize(context) ⇒ Authenticate
constructor
A new instance of Authenticate.
Constructor Details
#initialize(context) ⇒ Authenticate
6 7 8 |
# File 'lib/castle/commands/authenticate.rb', line 6 def initialize(context) @context = context end |
Instance Method Details
#build(options = {}) ⇒ Object
10 11 12 13 14 15 16 17 18 19 20 |
# File 'lib/castle/commands/authenticate.rb', line 10 def build( = {}) Castle::Validators::Present.call(, i[event]) context = Castle::Context::Merger.call(@context, [:context]) context = Castle::Context::Sanitizer.call(context) Castle::Command.new( 'authenticate', .merge(context: context, sent_at: Castle::Utils::Timestamp.call), :post ) end |