Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions config/middleware.php
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
use Marrow\Middleware\ThrottleRequests;
use Marrow\Middleware\TrimStrings;
use Marrow\Middleware\VerifyCsrfToken;
use Marrow\Middleware\VerifyWebhookSignature;

return [

Expand Down Expand Up @@ -45,6 +46,7 @@
'guest' => RedirectIfAuthenticated::class,
'throttle' => ThrottleRequests::class,
'csrf' => VerifyCsrfToken::class,
'webhook' => VerifyWebhookSignature::class,
'cors' => HandleCors::class,
'sanitize' => SanitizeInput::class,
'session' => StartSession::class,
Expand Down
22 changes: 18 additions & 4 deletions config/services.php
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,26 @@
|--------------------------------------------------------------------------
| Third-party service credentials
|--------------------------------------------------------------------------
| Conventional home for API keys/secrets used by your own integrations —
| nothing in the framework core reads this array besides 'http' above.
| Conventional home for API keys/secrets used by your own integrations.
| Two framework primitives read this block by convention (nothing reads
| it automatically — you opt in per service):
|
| - Marrow\Support\ServiceIntegration (a base class for wrapping a
| service as one container-bound class) reads 'base_uri' and
| 'secret' (as a bearer token) via its http() helper.
| - The 'webhook' middleware alias (Marrow\Middleware\
| VerifyWebhookSignature, ->middleware('webhook:stripe')) reads
| 'webhook_secret'/'webhook_header'/'webhook_timestamped'/
| 'webhook_tolerance' to verify an inbound webhook's signature.
|
| See docs/integrations.md.
|
| 'stripe' => [
| 'key' => env('STRIPE_KEY'),
| 'secret' => env('STRIPE_SECRET'),
| 'base_uri' => 'https://api.stripe.com/v1/',
| 'secret' => env('STRIPE_SECRET'),
| 'webhook_secret' => env('STRIPE_WEBHOOK_SECRET'),
| 'webhook_header' => 'Stripe-Signature',
| 'webhook_timestamped' => true,
| ],
*/

Expand Down
Loading