def METHOD_NAME(self, token):
    # Decode a JWT. Only used in tests -- in production, this is
    # First Book's job.
    # The JWT must be signed with the shared secret.
    payload = jwt.decode(token, self.secret, algorithms=self.ALGORITHM)
    # The 'iat' field in the payload must be a recent timestamp.
    assert (time.time()-int(payload['iat'])) < 2
    return payload['barcode'], payload['pin']