diff --git a/.gitignore b/.gitignore index 3c3629e..18eb894 100644 --- a/.gitignore +++ b/.gitignore @@ -1 +1,2 @@ node_modules +/nbproject/ \ No newline at end of file diff --git a/lib/cas.js b/lib/cas.js index 3a49580..02fec3e 100644 --- a/lib/cas.js +++ b/lib/cas.js @@ -374,9 +374,10 @@ CAS.prototype.validate = function(ticket, callback, service, renew) pgtURL = this.pgt_url; if (ticket.indexOf('PT-') == 0) { validate_path = 'proxyValidate'; + } else if (ticket.indexOf('ST-') == 0) { + validate_path = 'serviceValidate'; } else { - //validate_path = 'serviceValidate'; - validate_path = 'proxyValidate'; + throw new Error('can not determine validate path based on ticket prefix.'); } }