ePages 7.37.0 - DE_EPAGES/Order/API/JWT.pm

Package package

This package provides the JsonWebToken for the Order.

Package DE_EPAGES::Order::API::JWT

@EXPORT_OK
CreateOrderJsonWebToken
AddOrderTokenToURL

Functions

AddOrderTokenToURL
CreateOrderJsonWebToken

AddOrderTokenToURL

Creates a new JWT with the order scope and adds it to the given URL

Syntax
AddOrderTokenToURL($Servlet, $URL);
Input
$Servlet (object)
servlet
$URL (string)
cureent URL
Return
$URL (string)
URL with added JWT

CreateOrderJsonWebToken

Returns a newly created JSON web token with the order guid as subject and the secret taken from the "jwtsecret" key-value pair of the respective store conf. See DE_EPAGES::Core::API::PerlTools::CreateJsonWebToken.

Syntax
CreateOrderJsonWebToken($Lifetime, $Shop, $Scope);
Input
$Lifetime (integer)
the token's lifetime in seconds
$Order (object)
order
$Scope (string)
the token's scope (e.g. editor, order or provisioning)
Return
$JWT (string)
encoded JSON web token