You could check for a log-in cookie in your .htaccess, but that can be spoofed:
RewriteCond %{HTTP_COOKIE} ! wordpress_logged_in_.+= [NC]
RewriteRule \.pdf$ - [F,L]
Related Posts:
- Change GitHub Account username
- Google OAuth 2 authorization – Error: redirect_uri_mismatch
- What are the main differences between JWT and OAuth authentication?
- How to use OAuth authentication with REST API via CURL commands?
- How to validate a user from ouside wordpress/php?
- Override user authentication with external credentials
- JWT authentication with WP – Approach
- why does WordPress need two cookies for auth/login
- Extend WordPress (4.x) session and nonce
- How to use WordPress authentication on non-WordPress page?
- How does ifttt.com authenticate a supplied WordPress account
- Storing Dropbox Authentication?
- WordPress as a OAuth Provider
- Authentication for wordpress website
- How to leverage authentication outside of WordPress?
- How do I execute a wp_remote_get call using NTLM authentication?
- Outgoing proxy connection problem
- WordPress SSO with MemberPress
- Authenticated request to WP REST API V2 returning 403 error on /users/me [closed]
- Set authentication cookies to be shorter but then extend with every page load
- WordPress user Authentication
- WordPress asking for FTP details when installing plugins
- How to use Azure AD for authentication?
- implement authentication and authorization to user
- for a role-protected page, programmatically login user and load page
- guest authentication
- wordpress 3.9 remote token auth
- How to set up Shibboleth authentication for a MU site
- Login after “Read More” then return to article
- How to make WordPress use authentication from Parent Site
- auto logout user when user logout on one of the opened tab
- How can I have authenticated WordPress users automatically sign into Moodle?
- Requiring Authentication for Parts of WordPress Site
- WooCommerce OAuth 1.0 + JWT authentication with JS/React
- Authenticating users with usermeta fields
- Getting Authentication required popup
- How can LDAP/Active Directory be integrated in WordPress?
- Authenticate Subdomain
- How to create new users with JWT Auth Plugin?
- Mirgrating a user at signon
- Automate WordPress Login
- Application to Website authentication
- How to authenticate using JWT by ajax?
- Open authenticed WordPress page from mobile app
- Access to customer profile with pin code
- WP link for reset password is not received
- How to make an other web app can login with wordpress authentication?
- How to add additional factor to wordpress authentication
- Adding a “Sign In/My Account” link to an external app
- Check if user is logged in, inside php file in template directory
- Connect my WordPress site users to my public site account without showing my public site credentials
- WordPress Multisite and site speed and scaleability
- Blocking the direct access to images in the upload folder WordPress
- Can you pass user/pass for HTTP Basic Authentication in URL parameters?
- What is the difference between authentication and authorization?
- wp_signon by user’s login by their particular role
- nodejs – error self signed certificate in certificate chain
- Authenticating in PHP using LDAP through Active Directory
- How do I require authorization / login to view a specific set of posts / pages?
- WordPress auto login after registration not working
- Disable WordPress 3.6 idle logout / login modal window / session expiration
- How to pass users back and forth using session data?
- How to check WordPress website username and password is correct
- Should wordpress_logged_in cookie exist while logged out?
- How to authenticate custom API endpoint in WooCommerce [closed]
- How to build a plugin that supports authenticated POST requests to the REST API from external servers?
- Plugin to require Twitter or Facebook login before posting a comment [closed]
- Can I authenticate with both WooCommerce consumer key and JWT?
- add action which returns modified value
- WP REST API: check if user is logged in
- Can’t GET draft posts via REST API from headless frontend
- WP-API and Basic Auth returning 403 on POST but not GET
- How to redirect a Custom Google Search to a wordpress page/template?
- Single sign-on: wp_authenticate_user vs wp_authenticate
- How does the “authentication unique keys and salts” feature work?
- How Authentication in wordpress works? wp_authenticate_username_password()
- current_user_can(‘administrator’) returns false when I’m logged in
- How to save generated JWT token to cookies on login?
- how to oauth1 Wp plug-in revoke/reset.?
- How to force JWT auth for default GET endpoints of WordPress rest api?
- REST API: best place to set current user for JWT auth?
- Why can’t I access my Intranet LDAPS with NADI?
- What’s the most efficient solution when augmenting google custom search results with taxonomies?
- WordPress Multisite logout conflict
- How to stop showing my under development site on Google Search [closed]
- Best Authetication between REST API and Mobile App
- What WP-API authentication method should I use to interact with anonymous / not-logged visitors?
- `authenticate` filter never gets called
- authenticate user without redirecting
- Log in user using WordPress REST API
- How to allow access based on the user meta flag
- Authentication between two different sites using the WordPress login cookie
- Using WordPress login for a non word-press website
- throttle/limit a logged in user’s http requests to specific page on a per day basis
- Opening protected page with cookie?
- Create Mashable Follow-like Facebook, Twitter login/connect?
- Change All Login/Signup Links in Plugin
- External Authentication
- Login and register by API
- wordpress rest api authentication failed