http auth an iframe automatically so users don't have to login?

5,467

Your iframe method could work. You could extract the usernames and hashed passwords from the wordpress database and use them to create usernames and passwords on your gallery. The method for this would depend on what sort of server you have.

You would then need to hack Wordpress to create an iframe with the source link having the username and hashed password embedded in it like this:

http://username:[email protected]/gallery

Another method would be to tweak the php gallery so that it only works for certain unguessable URLs, and generate one of those for each user such as a hash of their username.

http://example.com/gallery/848f16b2c71813dde3479f77dd1b49d5

This would mean less tweaking of Wordpress (no diving into the database) but more tweaking of your gallery CMS>

Share:
5,467

Related videos on Youtube

Simon Hayter
Author by

Simon Hayter

Updated on September 18, 2022

Comments

  • Simon Hayter
    Simon Hayter over 1 year

    I have a members only site running WordPress and a stock images gallery running an old php gallery CMS. I want the members to only have to login once but I want to protect the gallery from the general public. I trust my members so I don't need anything spectacularly secure. I was thinking about using an iframe that auto logs into the gallery folder via HTTP authentication. Is this possible (if so how) or is there a better method?