Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
HttpFoundationFactory example
catch
(
RateLimitExceededException
$exception
)
{
throw
new
AuthThrottledException
(
$exception
->
getWaitTime
(
)
,
$exception
)
;
}
$psr7Request
=
$this
->psrHttpFactory->
createRequest
(
$request
)
;
$psr7Response
=
$this
->psrHttpFactory->
createResponse
(
$response
)
;
$response
=
$this
->authorizationServer->
respondToAccessTokenRequest
(
$psr7Request
,
$psr7Response
)
;
$this
->rateLimiter->
reset
(
RateLimiter::OAUTH,
$cacheKey
)
;
return
(
new
HttpFoundationFactory
(
)
)
->
createResponse
(
$response
)
;
}
}