Put this on your wp-config.php
/* That's all, stop editing! Happy blogging. */
define('FS_METHOD', 'direct');
{"lastUpload":"2019-12-29T12:06:45.338Z","extensionVersion":"v3.4.3"} |
Put this on your wp-config.php
/* That's all, stop editing! Happy blogging. */
define('FS_METHOD', 'direct');
<?php | |
// Create The First Key | |
echo base64_encode(openssl_random_pseudo_bytes(32)); | |
// Create The Second Key | |
echo base64_encode(openssl_random_pseudo_bytes(64)); | |
?> | |
-------------------------------------------------------- | |
<?php | |
// Save The Keys In Your Configuration File |
<?php | |
/** | |
* == About this Gist == | |
* | |
* Code to add to wp-config.php to enhance information available for debugging. | |
* | |
* You would typically add this code below the database, language and salt settings | |
* | |
* Oh.. and *do* make sure you change the path to the log file to a proper file path on your server (make sure it exists). | |
* |
This is just some code I recently used in my development application in order to add token-based authentication for my api-only rails app. The api-client was to be consumed by a mobile application, so I needed an authentication solution that would keep the user logged in indefinetly and the only way to do this was either using refresh tokens or sliding sessions.
I also needed a way to both blacklist and whitelist tokens based on a unique identifier (jti)
Before trying it out DIY, I considered using: