nodejs(connect-cas2)調cas報錯Receive response from CAS when validating ticket, but the validation is failed 完整報錯:node
options.restletIntegration is set, but options.paths.restletIntegration is undefined! Maybe you forget to set all your paths. Get lastUrl: http://localhost:3000/ Start validating ticket... Find ticket in query ST-2-6MNRwXC2DBeEJ3tsVdFU-cas01.example.org Sending request to: "http://130.51.23.165:8180/cas/serviceValidate?pgtUrl=http%3A%2F%2Flocalhost%3A3000%2Fbuglycas%2FproxyCallback&service=http%3A%2F%2Flocalhost%3A3000%2Findex&ticket=ST-2-6MNRwXC2DBeEJ3tsVdFU-cas01.example.org" to validate ticket. |GET|http://130.51.23.165:8180/cas/serviceValidate?pgtUrl=http%3A%2F%2Flocalhost%3A3000%2Fbuglycas%2FproxyCallback&service=http%3A%2F%2Flocalhost%3A3000%2Findex&ticket=ST-2-6MNRwXC2DBeEJ3tsVdFU-cas01.example.org|200|100 Receive from CAS server, status: 200 Receive response from CAS when validating ticket, but the validation is failed. Cas response: { '$': { 'xmlns:cas': 'http://www.yale.edu/tp/cas' }, authenticationFailure: [ { _: '\r\n\t\tUNAUTHORIZED_SERVICE_PROXY\r\n\t', '$': [Object] } ] }
解決:rest
Sending request to: "http://130.51.23.165:8180/cas/serviceValidate?pgtUrl=http%3A%2F%2Flocalhost%3A3000%2Fbuglycas%2FproxyCallback&service=http%3A%2F%2Flocalhost%3A3000%2Findex&ticket=ST-2-6MNRwXC2DBeEJ3tsVdFU-cas01.example.org" to validate ticket. 用了pgt,不對,不要proxy。 proxyCallback不要定義,填空。code