Skip to main content

Questions tagged [authorization]

The tag has no usage guidance.

Filter by
Sorted by
Tagged with
0 votes
1 answer
439 views

Authenticate + Authorize WP REST API request before built-in WP JSON Schema Payload Validation?

Suppose you register the following endpoint in your application on example.org: register_rest_route( 'sample/v1', '/test', [ [ 'methods' => 'POST', ...
DevelJoe's user avatar
  • 487
0 votes
2 answers
2k views

How to Restrict Access to all wp-admin pages for subscriber users

Here is summary of the problem and required solution: Access to mywebsite.com/wp-admin is blocked for subscribers [which is good] However, if i enter the link manually on the browser as follows: ...
The Oracle's user avatar
0 votes
0 answers
294 views

IIS Authorization Rules breaks WP REST-API and results in fail in Site Health

apperently it seems the wordpress rest-api cannot work with restricted authorizations. when i change the default Allow All Users / this: to a restricting ad group and remove the All Users (obviously):...
my2cents's user avatar
0 votes
1 answer
47 views

Requiring Authentication for Parts of Wordpress Site

I have a site that I've inherited and my user base is requesting a feature. The page is primarily informational about a non-profit (calendar of events, contact form, etc.) but they'd like to add a ...
tommy_o's user avatar
  • 101
1 vote
1 answer
3k views

How to force Authentication on REST API for Password protected page using custom table and fetch() without Plugin

I am implementing the REST API with fetch() promises as requests on a Password protected page with a custom table without using a plugin (only using the WP REST API that has been merged into WordPress ...
Jürgen Fink's user avatar
1 vote
1 answer
530 views

Check user logged in from outside of WP folder

If user is logged in to site/subsite, and you check this function: require(__DIR__."/wp-load.php"); var_dump(is_user_logged_in()); it returns true. However, if called from outside folder: ...
T.Todua's user avatar
  • 5,810
1 vote
2 answers
2k views

Authentication with internal WP_REST_Request and rest_do_request()

How can I add authentication for rest_do_request()? I am trying to add Authentication for a WP_REST_Request object using rest_do_request(). This used within a shortcode that is going to be available ...
Tom's user avatar
  • 143
0 votes
1 answer
1k views

WordPress Users authentication with Java Application

I have a Java Web App which contains users. On the other side, I have a wordpress installation. I have a requirement that users from my java app should be also avaible in wordpress (in other words: ...
PastorPL's user avatar
  • 103
0 votes
1 answer
84 views

How do I edit disclaimer/contact information?

I inherited this wordpress website called RxStudyGuides to use as a study tool for pharmacy students. However, the owner and creator of the website still has there contact information on the website ...
rhochieboard's user avatar
0 votes
1 answer
6k views

WordPress REST Api: update user

I have created an user via wordpress api, then after registration, I save user's username and password into the sessionStorage, and then, finaly, try to edit user's profile. Here's my post request ...
errorous's user avatar
  • 169
1 vote
1 answer
450 views

Custom login doesn't work properly

I've a made a plugin which generates a login form, by using a shortcode. The login works, however, inside the dashboard I've noticed that the forms submits don't work properly. For example, the ...
DamianFox's user avatar
4 votes
1 answer
451 views

How does ifttt.com authenticate a supplied WordPress account

I'm curious to know how ifttt.com authenticate a supplied WordPress admin login credentials. And after authorization is granted, how does it publish post on our behalf? am curious to know what ...
W3Guy's user avatar
  • 264
0 votes
1 answer
142 views

How to display archive page posts based on author_id

I would like the posts to be displayed on archive page of custom post - gallery based on author_id i.e. the author_id is passed as permalink variable. The posts displayed on archive page would be only ...
Shahrukh Khan's user avatar
0 votes
1 answer
233 views

Password Protected Page + Showing Different Page If Not Authenticated/Authorized

I have a few pages of custom posts that I would like to password protect via the following business rules: I can create a number of passwords to access the page An expiration date can be set for each ...
WordPressNewbie's user avatar
6 votes
1 answer
420 views

What is the purpose of having a token in cookies?

WordPress utilizes cookies for better security, and I've been trying to understand how exactly this could make a WordPress website more secure, and I found this article . There's a pretty decent ...
Mikhail Morfikov's user avatar
0 votes
0 answers
1k views

Usage of wp_send_json_success and wp_redirect at the same time

I have to send the success response to ajax if user filled the form fields successfully or not on the client side and redirect to the other page which finalize his authorization at the same time on ...
Павел Иванов's user avatar
1 vote
1 answer
2k views

Wordpress Authentication Middleware

What I want to achieve is: For every request , if the user is not logged he / she will be redirected to the log in page. If the user is logged in then he / she can access the site. class Auth{ ...
Laxmana's user avatar
  • 1,332
0 votes
1 answer
2k views

Require authorization for access to RSS feeds, but leave posts public

Is there a way to protect all RSS feeds from my WPMU install without blocking access to the individual posts or pages? Essentially I want anyone to have access to individual pages, but the aggregate ...
Jake Lisby's user avatar
3 votes
2 answers
6k views

how can i embed wordpress backend in iframe

I have 2 websites http://www.aaa.com and http://www.bbb.com and need them to show the same. Now I put an iframe in index.html and upload to aaa.com. It's ok for frontend but it's doesn't work for ...
toonztudio's user avatar
1 vote
4 answers
2k views

Restrict user role Author from viewing comments in admin interface

I want to add an user as an Author to my blog, so that he can publish posts. But i don't want him to be able to view all the (unapproved) comments in the admin interface. Is there any code snippet / ...
Lamnk's user avatar
  • 111
1 vote
1 answer
291 views

Authenticating user for custom post type [closed]

Referring to the docs got add_meta_box, // Check permissions if ( 'page' == $_POST['post_type'] ) { if ( !current_user_can( 'edit_page', $post_id ) ) return; } else { if ( !...
JM at Work's user avatar
  • 2,323
2 votes
1 answer
2k views

Why does this check to see if user is authorized to edit a post fail for all but super admins?

I'm trying to determine if a piece of content can be edited by a user. I would like all roles contributor and above to be authorized by a single check. Here's my code: if( empty( $post_id ) || !...
editor's user avatar
  • 1,761