Class: Banacle::InteractiveMessage::Authenticator
- Inherits:
-
Object
- Object
- Banacle::InteractiveMessage::Authenticator
- Defined in:
- lib/banacle/interactive_message/authenticator.rb
Defined Under Namespace
Classes: Error, NotAuthenticatedError
Instance Method Summary collapse
-
#authenticate_approver!(request) ⇒ Object
override to implement your own validation.
-
#authenticate_canceller!(request) ⇒ Object
override to implement your own validation.
-
#authenticate_rejector!(request) ⇒ Object
override to implement your own validation.
Instance Method Details
#authenticate_approver!(request) ⇒ Object
override to implement your own validation
8 9 10 11 12 |
# File 'lib/banacle/interactive_message/authenticator.rb', line 8 def authenticate_approver!(request) if request.self_actioned? raise NotAuthenticatedError.new("you cannot approve the request by yourself") end end |
#authenticate_canceller!(request) ⇒ Object
override to implement your own validation
22 23 24 25 26 |
# File 'lib/banacle/interactive_message/authenticator.rb', line 22 def authenticate_canceller!(request) unless request.self_actioned? raise NotAuthenticatedError.new("you cannot cancel the request by other than the requester") end end |
#authenticate_rejector!(request) ⇒ Object
override to implement your own validation
15 16 17 18 19 |
# File 'lib/banacle/interactive_message/authenticator.rb', line 15 def authenticate_rejector!(request) if request.self_actioned? raise NotAuthenticatedError.new("you cannot reject the request by yourself") end end |