Class: Rack::DiscordInteractions::Verifier
- Inherits:
-
Object
- Object
- Rack::DiscordInteractions::Verifier
- Defined in:
- lib/rack/discord-interactions/verifier.rb
Overview
Middleware to handle verification of interaction signatures
Instance Method Summary collapse
-
#initialize(app, public_key, path: nil, handle_pings: true) ⇒ Verifier
constructor
A new instance of Verifier.
Constructor Details
#initialize(app, public_key, path: nil, handle_pings: true) ⇒ Verifier
Returns a new instance of Verifier.
24 25 26 27 28 29 |
# File 'lib/rack/discord-interactions/verifier.rb', line 24 def initialize(app, public_key, path: nil, handle_pings: true) @app = app @verify_key = Ed25519::VerifyKey.new([public_key].pack('H*')) @path = path @handle_pings = handle_pings end |