I’m using a simple service called I’m PDF to create PDF versions on online invoices. Right now, the client has to login to see the online version, but as a result, the api service doesn’t have access to it either. How would I detect that the pdf service is accessing the site and allow it accordingly without a password?
I thought $_Server[‘http_referrer’] would do it, but I didn’t have any luck. I wasn’t sure even what the variables would be, so I had a var_dump($_Server)it emailed to me, whenever the page was visited. It sent it beautifully when I went to the page, but when the pdf was generated, no luck.
Any ideas?
Thanks for your help!
You need to identify the user. The only way with this service seems to be to append something to the pdf URL (GET parameter).
So create some secret on the server side, sign user id with it, append it to impdf URL and parse it with your secret on request. You will end up with user id that you can use for authorization.