REST API authentication for a plugin
REST API authentication for a plugin
REST API authentication for a plugin
To whom it may help… I found the answer: Why? Because We were not actually using Active Directory, but some other kind of Directory provided by Oracle: OUD. It is possible to access it from another plugin, though: How? We had to use https://wordpress.org/plugins/wpdirauth/ We succeeded configure the “Use SSL” case Account Filter: This is … Read more
for a role-protected page, programmatically login user and load page
WordPress authentication cookie and ajax calls
The JWT Authentication for WP REST API plugin offers a user authentication mechanism. You will need to: install and configure the plugin make user authentication requests against the new token endpoint optionally use the token to make further queries on behalf of users continue using OAuth 1.0 for WP/WC REST queries References: https://jwt.io/introduction/ Using JWT … Read more
Add basic authentication of WordPress on any external PHP file?
Probably the easiest way is to use a plugin. Ultimate Member – User Profile & Membership Plugin is a good one. Activate it on your site, then in the settings you can limit your site to be accessed only by logged in users. If they are not logged in, you can redirect them to the … Read more
WordPress + REST API v2 and private pages Load by slug
It’s better not to do so. And I’m completely against overriding the default authentication mechanism simply because of WordPress and it’s plugins usually are depended on the website’s database. But if you’re really into this situation WordPress provides a filter called authenticate: add_filter( ‘authenticate’, ‘wpse75679_auth’, 30, 3 ); function wpse75679_auth( $user, $username, $password ) { … Read more
How can I force the user to log in, even if they’re already authenticated?