Code
Explorer
You are a developer and looking for Shopware projects?
Apply Now!
tokenInvalidated example
/** @var UnencryptedToken $jwtToken */
$jwtToken
=
$this
->configuration->
parser
(
)
->
parse
(
$token
)
;
}
catch
(
\Throwable
$e
)
{
throw
PaymentException::
invalidToken
(
$token
,
$e
)
;
}
if
(
!
$this
->configuration->
validator
(
)
->
validate
(
$jwtToken
, ...
$this
->configuration->
validationConstraints
(
)
)
)
{
throw
PaymentException::
invalidToken
(
$token
)
;
}
if
(
!
$this
->
has
(
$token
)
)
{
throw
PaymentException::
tokenInvalidated
(
$token
)
;
}
$errorUrl
=
$jwtToken
->
claims
(
)
->
get
(
'eul'
)
;
/** @var \DateTimeImmutable $expires */
$expires
=
$jwtToken
->
claims
(
)
->
get
(
'exp'
)
;
return
new
TokenStruct
(
$jwtToken
->
claims
(
)
->
get
(
'jti'
)
,
$token
,
$jwtToken
->
claims
(
)
->
get
(
'pmi'
)
,