src/pccutilities.php
public function gen_auth_header($auth_jwt_claim, $auth_jwt_key,
            $auth_basic_user, $auth_basic_pass)
    {
        if (!is_null($auth_basic_user))
            return 'Basic ' . base64_encode(
                    "{$auth_basic_user}:{$auth_basic_pass}");
        elseif (!is_null($auth_jwt_claim))
        {
            $claim = $auth_jwt_claim;
            if (!array_key_exists('exp', $claim))
                $claim['exp'] = time() + 3600;

            // Signed with HS256 by default
            return 'Bearer ' . \Firebase\JWT\JWT::encode($claim, $auth_jwt_key);
        }
        else 
            return null;
    }
public function gen_auth_header($auth_jwt_claim, $auth_jwt_key,
            $auth_basic_user, $auth_basic_pass)
    {
        if (!is_null($auth_basic_user))
            return 'Basic ' . base64_encode(
                    "{$auth_basic_user}:{$auth_basic_pass}");
        elseif (!is_null($auth_jwt_claim))
        {
            $claim = $auth_jwt_claim;
            if (!array_key_exists('exp', $claim))
                $claim['exp'] = time() + 3600;

            // Signed with HS256 by default
            return 'Bearer ' . \Firebase\JWT\JWT::encode($claim, $auth_jwt_key);
        }
        else 
            return null;
    }
'set_*_auth' methods defined above.