atoy40 / meteor-accounts-cas

CAS authentication integration with Meteor JS
20 stars 15 forks source link

Force the callback url on the CAS server #9

Open ay13 opened 8 years ago

ay13 commented 8 years ago

I have a situation where the CAS server I am authenticating against only allows certain domains and the connection must be SSL. On my local machine, the meteor app is not secure and at localhost:3000 (the meteor default) so I run a reverse proxy with nginx to appear like I am from a certain URL and using a self-signed certificate. The way this package gets its URLs for the CAS callback was through Meteor.absoluteUrl() so it always used http://localhost:3000 as the URL and my CAS would reject the request.

This pull request gives you the option of adding "proxyURL" key:value pair to the settings.json. If you do not add this key:value pair it will act just like it always has, but if you have it it will use that URL instead of the result from Meteor.absoluteUrl().