• I am writing a plugin (for my use only, not to be published) that uses a SOAP API to pull in data. This service uses a plain text username and password. I am wondering what the best (i.e. most secure) way to store these login details is. During development I have just had them saved as variables in my plugin function file, but this doesn’t seem secure in the long term.

    I searched around and couldn’t find an answer to this. Any ideas?

    Thanks!!

Viewing 1 replies (of 1 total)
  • rebeccahbl-

    You can do it in two ways.

    1. Keeping detail in option table. But before saving your detail you may encrypt it using any Encryption method .Create one algorithm(that will be found easily on google) that will help you to secure your login detail.

    For example
    To add into Option table.

    //Once you add this into database.You may remove this below line.
    add_option( 'username', 'Your encrypted username');

    To get from option table

    get_option( $option, $default );

    2. place your detail in config file.

Viewing 1 replies (of 1 total)
  • The topic ‘How to store API login information’ is closed to new replies.