I am not sure if there is a good way to do this. Currently I have a website that users log into. In that website there is pages that have API calls to another service, this service uses:
Authorization: BASIC username:password
Where the username and password are not the same as the ones used to log into site. Is there a way I could have it where they do a second login in my site (once they go to one of these pages) and then use this base64 auth string across multiple pages on my site securely?
I can't exactly store the username and password in a database, since it would just be plaintext. Currently I could have them submit the user/pass on every page that needs the API and just post it without storing it, but this is a MAJOR pain to do on every single request.
Is there a possibly way to store this for the duration of their login on my site securely?