Skip to content

Commit 839e82a

Browse files
authored
Merge pull request #28 from TomHAnderson/feature/apikey
Feature/apikey
2 parents ee02712 + d8da80f commit 839e82a

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

43 files changed

+330
-190
lines changed

app/Http/Kernel.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ class Kernel extends HttpKernel
6666
],
6767

6868
'api' => [
69-
// \Laravel\Sanctum\Http\Middleware\EnsureFrontendRequestsAreStateful::class,
69+
// 'auth.apikey' => AuthorizeApiKey:class
7070
ThrottleRequests::class . ':api',
7171
SubstituteBindings::class,
7272
],

app/Providers/AppServiceProvider.php

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,11 @@
44

55
namespace App\Providers;
66

7+
use ApiSkeletons\Laravel\Doctrine\ApiKey\Service\ApiKeyService;
78
use Illuminate\Support\ServiceProvider;
89

10+
use function app;
11+
912
class AppServiceProvider extends ServiceProvider
1013
{
1114
/**
@@ -20,5 +23,6 @@ public function register(): void
2023
*/
2124
public function boot(): void
2225
{
26+
app(ApiKeyService::class)->init(app('em'));
2327
}
2428
}

composer.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"require": {
88
"php": "^8.3",
99
"api-skeletons/doctrine-orm-graphql": "^10.2",
10+
"api-skeletons/laravel-doctrine-apikey": "^2.0.2",
1011
"api-skeletons/laravel-doctrine-data-fixtures": "^1.0",
1112
"guzzlehttp/guzzle": "^7.2",
1213
"laravel-doctrine/migrations": "^3.1",

composer.lock

Lines changed: 148 additions & 19 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

database/database.sqlite

60 KB
Binary file not shown.

ldog.skipper

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<?xml version="1.0"?>
2-
<skipper version="3.3.7.1828" mvc="Without MVC" orm="Doctrine2" name="api-skeletons/doctrine-graphql" uuid="25d2b513-c6b7-4071-9ada-7c48f127f426">
3-
<module name="\ldog" local-name="ldog" namespace="\App\Doctrine\ORM\Entity" local-namespace="\App\Doctrine\ORM\Entity" export-format="Doctrine2Xml" export-path="config/doctrine-orm-metadata" uuid="d5f257f8-d854-4bae-a05d-1ed8673c7eb5">
2+
<skipper version="3.3.7.1828" mvc="Without MVC" orm="Doctrine2" name="LDOG Stack" uuid="25d2b513-c6b7-4071-9ada-7c48f127f426">
3+
<module name="\LDOG Stack Example Schema" local-name="LDOG Stack Example Schema" namespace="\App\Doctrine\ORM\Entity" local-namespace="\App\Doctrine\ORM\Entity" export-format="Doctrine2Xml" export-path="config/doctrine-orm-metadata" uuid="d5f257f8-d854-4bae-a05d-1ed8673c7eb5">
44
<entity name="\App\Doctrine\ORM\Entity\Artist" local-name="Artist" namespace="\App\Doctrine\ORM\Entity" uuid="10de66e4-a8b3-44a9-a6d0-a9fd28338fe2">
55
<field name="id" type="bigint" required="true" unique="true" primary="true" auto-increment="true" uuid="9d8eb724-b4f3-414c-9d1a-48bd61008f33"/>
66
<field name="name" type="string" required="true" unique="true" uuid="b5bf5f02-5032-4637-9d89-af0c6748d4fc"/>
@@ -49,17 +49,21 @@
4949
<attribute name="filename-format">with-namespace</attribute>
5050
</orm-attributes>
5151
</module>
52+
<external-module storage-path="vendor/api-skeletons/laravel-doctrine-apikey/ApiKey.skipper.module"/>
5253
<visual-data>
54+
<association uuid="056be1e5-0677-44ad-8f6f-1b4023eb9a7d" color="#969696"/>
5355
<association uuid="4f0247e2-6d76-42f9-b56b-52306c2fa201" caption1-position-x="0" caption1-position-y="0" center-position-x="0" center-position-y="0" color="#969696"/>
5456
<association uuid="ab34ba86-e61e-458a-87e7-9dfa2aa1f391" caption1-position-x="0" caption1-position-y="0" center-position-x="0" center-position-y="0" color="#969696"/>
55-
<comment uuid="0e4ff410-5025-42fd-89ae-0d05319ab49b" bg-color="#FFFFE0" position-x="403" position-y="293" size-x="6" size-x2="128" size-y="-3" size-y2="63" txt-color="#000000"/>
56-
<entity uuid="10de66e4-a8b3-44a9-a6d0-a9fd28338fe2" bg-color="#FFFFFF" hdr-color="#D2D2D2" position-x="-23" position-y="-44" size-x="0" size-x2="77" size-y="0" size-y2="45"/>
57-
<entity uuid="568a03b7-3dd5-435a-9bc8-869bc673923c" bg-color="#FFFFFF" hdr-color="#D2D2D2" position-x="-23" position-y="136" size-x="0" size-x2="93" size-y="0" size-y2="73"/>
57+
<association uuid="c997c4aa-195c-4f0e-8a32-5506f53f0ab9" color="#969696"/>
58+
<comment uuid="0e4ff410-5025-42fd-89ae-0d05319ab49b" bg-color="#FFFFE0" position-x="243" position-y="253" size-x="6" size-x2="128" size-y="-3" size-y2="63" txt-color="#000000"/>
59+
<entity uuid="10de66e4-a8b3-44a9-a6d0-a9fd28338fe2" bg-color="#FFFFFF" hdr-color="#D2D2D2" position-x="-3" position-y="-29" size-x="0" size-x2="77" size-y="0" size-y2="45"/>
60+
<entity uuid="568a03b7-3dd5-435a-9bc8-869bc673923c" bg-color="#FFFFFF" hdr-color="#D2D2D2" position-x="-3" position-y="136" size-x="0" size-x2="93" size-y="0" size-y2="87"/>
5861
<entity uuid="8a04b312-72bb-4723-baac-75502524ae38" bg-color="#FFFFFF" hdr-color="#D2D2D2" position-x="177" position-y="-44" size-x="0" size-x2="136" size-y="0" size-y2="101"/>
5962
<entity uuid="ad470906-9e63-41e7-9558-979789bc2d28" bg-color="#FFFFFF" hdr-color="#D2D2D2" position-x="177" position-y="136" size-x="0" size-x2="122" size-y="0" size-y2="59"/>
6063
<entity uuid="e5603f71-6798-480b-bcf8-0d185a08e653" bg-color="#FFFFFF" hdr-color="#D2D2D2" position-x="77" position-y="256" size-x="0" size-x2="109" size-y="0" size-y2="60"/>
6164
<many-to-many-association uuid="e4936d0d-1d1f-4fb8-af31-fa1d0665ccf7" color="#969696"/>
62-
<module uuid="d5f257f8-d854-4bae-a05d-1ed8673c7eb5" bg-color="#E1EDF0" position-x="43" position-y="84" size-x="43" size-x2="577" size-y="84" size-y2="376"/>
63-
<project uuid="25d2b513-c6b7-4071-9ada-7c48f127f426" size-x="50" size-x2="660" size-y="50" size-y2="500"/>
65+
<module uuid="5bbfe5b4-7579-44ee-81f9-fa036ee071a3" position-x="443" position-y="-18"/>
66+
<module uuid="d5f257f8-d854-4bae-a05d-1ed8673c7eb5" bg-color="#E0F0EF" position-x="43" position-y="84" size-x="43" size-x2="417" size-y="84" size-y2="376"/>
67+
<project uuid="25d2b513-c6b7-4071-9ada-7c48f127f426" size-x="50" size-x2="1220" size-y="50" size-y2="500"/>
6468
</visual-data>
6569
</skipper>

0 commit comments

Comments
 (0)