You've already forked Php-Template
feat: implement JWT authentication and scope validation middleware #11
@@ -61,6 +61,10 @@ services:
|
|||||||
- "traefik.http.routers.api.entrypoints=web-secure"
|
- "traefik.http.routers.api.entrypoints=web-secure"
|
||||||
- "traefik.http.routers.api.rule=Host(`localhost`) || Host(`127.0.0.1`)"
|
- "traefik.http.routers.api.rule=Host(`localhost`) || Host(`127.0.0.1`)"
|
||||||
- "traefik.http.routers.api.tls=true"
|
- "traefik.http.routers.api.tls=true"
|
||||||
|
- "traefik.http.routers.api.service=api"
|
||||||
|
- "traefik.http.services.api.loadbalancer.healthcheck.path=/healthz"
|
||||||
|
- "traefik.http.services.api.loadbalancer.healthcheck.interval=5s"
|
||||||
|
- "traefik.http.services.api.loadbalancer.healthcheck.timeout=60s"
|
||||||
volumes:
|
volumes:
|
||||||
- .:/app
|
- .:/app
|
||||||
build:
|
build:
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ class JsonResponseFactoryTest extends TestCase
|
|||||||
|
|
||||||
$response = JsonResponseFactory::createJsonResponse($data, $statusCode);
|
$response = JsonResponseFactory::createJsonResponse($data, $statusCode);
|
||||||
|
|
||||||
$this->assertSame($statusCode, $response->getStatusCode());
|
$this->assertSame($statusCode->value, $response->getStatusCode());
|
||||||
$this->assertSame('application/json', $response->getHeaderLine('Content-Type'));
|
$this->assertSame('application/json', $response->getHeaderLine('Content-Type'));
|
||||||
$this->assertSame(json_encode($data), (string) $response->getBody());
|
$this->assertSame(json_encode($data), (string) $response->getBody());
|
||||||
}
|
}
|
||||||
@@ -35,7 +35,7 @@ class JsonResponseFactoryTest extends TestCase
|
|||||||
|
|
||||||
$response = JsonResponseFactory::createJsonResponse($data, $statusCode);
|
$response = JsonResponseFactory::createJsonResponse($data, $statusCode);
|
||||||
|
|
||||||
$this->assertSame($statusCode, $response->getStatusCode());
|
$this->assertSame($statusCode->value, $response->getStatusCode());
|
||||||
$this->assertSame('application/json', $response->getHeaderLine('Content-Type'));
|
$this->assertSame('application/json', $response->getHeaderLine('Content-Type'));
|
||||||
$this->assertSame(json_encode($data), (string) $response->getBody());
|
$this->assertSame(json_encode($data), (string) $response->getBody());
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user