View more context

 

brett.tasker

I don't think you can use BasicAuth and not have a prompt for a password when visiting without the username:password in the domain.

IMO you would be better off building a "TempSHA" model which can be used for temporary validation to access the website (e.g. with a TTL so is only active for a while).

You can then send links to any users with the SHA in the GET parameters that PHP would validate and either serve the page, or serve an error (e.g. 403)

Pete

Yeah, it seems to be very difficult to do that. Thanks anyway, I'll keep working on it

Firesphere

For pages that should be accessible via a special link, I think there's a module that does that

Firesphere

but I do think that module publishes, but validates the hash, not if the user has permission to use the hash

Firesphere

Basically, let's roll back and look at what you and your client actually want to achieve?

Firesphere

A logged-in-users only page? Then... why not make it accessible to logged in users, or specific users only? A page that is only accessible if users have the correct link/data, e.g. to share a preview of a blogpost? Then the hashing method should work

alt

This package requires php 7.2 but your PHP version (7.2.9) does not satisfy that requirement.

jkersu

Anyone have experience streaming and downloading a PDF from an S3 bucket? For some reason, I can't open some downloaded pdfs in adobe or save it from the browser, but sometimes for certain files it works fine. The code I have currently to download it is:

  1. $filePath = $file->Path;
  2. $data = stream_get_contents($service->getFile($filePath)->readStream());
  3. header("Content-type: application/pdf");
  4. $fileTitle = 'test.pdf';
  5. header("Content-disposition: attachment;filename=." . $fileTitle);
  6. echo $data;