Reputation: 767
Now I can add pass by link from my web service. Next, I want to be able to update that pass. Thus, I need to add webserviceURL and authenticationToken, but how to get this token ?
Upvotes: 2
Views: 3063
Reputation: 12581
You make it up. The only requirement is that it is at least 16 characters long.
This token is used by the device, in conjunction with the serialNumber and passTypeIdentifier to authenticate against your web service and let it know that the device is authorised to receive a particular pass.
In PHP you could do something like:
$authToken = generateAuthToken();
function generateAuthToken($length = 16) {
return substr(str_shuffle("0123456789abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ"), 0, $length);
}
Upvotes: 5