Skip to content

Instantly share code, notes, and snippets.

@ocke
ocke / gist:6723065
Created September 27, 2013 01:37
PHP implementation of SSO with JWT
<?php
// load JWT class
// Class can be found here: https://github.com/firebase/php-jwt
include __DIR__.'/JWT.class.php';
$JWT = new JWT();
// Zendesk provides a timestamp in the get.
$now = (!empty($_GET['timestamp'])) ? $_GET['timestamp'] : time();