{"id":293545,"date":"2026-06-16T22:49:18","date_gmt":"2026-06-16T22:49:18","guid":{"rendered":"https:\/\/wordpress.org\/plugins\/doccheck-access\/"},"modified":"2026-06-16T22:48:43","modified_gmt":"2026-06-16T22:48:43","slug":"doccheck-access","status":"publish","type":"plugin","link":"https:\/\/wordpress.org\/plugins\/doccheck-access\/","author":15537648,"comment_status":"closed","ping_status":"closed","template":"","meta":{"version":"1.0.6","stable_tag":"1.0.6","tested":"7.0","requires":"5.0","requires_php":"7.2","requires_plugins":null,"header_name":"DocCheck Access","header_author":"DocCheck Agency","header_description":"Integrates DocCheck OAuth2 Login into WordPress","assets_banners_color":"","last_updated":"2026-06-16 22:48:43","external_support_url":"","external_repository_url":"","donate_link":"","header_plugin_uri":"","header_author_uri":"https:\/\/doccheck.agency\/","rating":0,"author_block_rating":0,"active_installs":0,"downloads":31,"num_ratings":0,"support_threads":0,"support_threads_resolved":0,"author_block_count":0,"sections":["description","installation","faq","changelog"],"tags":{"1.0.6":{"tag":"1.0.6","author":"antwerpes","date":"2026-06-16 22:48:43"}},"upgrade_notice":{"1.0.6":"<p>Adds a direct Settings link on the WordPress plugins overview screen for faster access to the plugin configuration page.<\/p>","1.0.5":"<p>OAuth state handling no longer exposes WordPress auth salts, and session user data is recursively sanitized.<\/p>","1.0.4":"<p>The sitemap shortcode now sanitizes generated hierarchical page-list HTML before returning it.<\/p>","1.0.3":"<p>Shortcodes and developer-facing identifiers now use the <code>docacc<\/code> prefix. Update any content or custom code that referenced older shortcode or hook names.<\/p>","1.0.0":"<p>Initial release.<\/p>"},"ratings":[],"assets_icons":[],"assets_banners":[],"assets_blueprints":{},"all_blocks":[],"tagged_versions":["1.0.6"],"block_files":[],"assets_screenshots":{"screenshot-1.png":{"filename":"screenshot-1.png","revision":3575047,"resolution":"1","location":"assets","locale":"","width":935,"height":857},"screenshot-2.png":{"filename":"screenshot-2.png","revision":3575047,"resolution":"2","location":"assets","locale":"","width":752,"height":314},"screenshot-3.png":{"filename":"screenshot-3.png","revision":3575047,"resolution":"3","location":"assets","locale":"","width":1796,"height":782}},"screenshots":{"1":"General Settings overview.","2":"User Management with Anonymous Session selected.","3":"User Management with WordPress User selected.","4":"<code>size<\/code> \u2014 Button size: <code>small<\/code>, <code>medium<\/code> (default), <code>large<\/code>","5":"<code>language<\/code> \u2014 Language code, e.g. <code>en<\/code>, <code>de<\/code> (default: WordPress locale)","6":"<code>state<\/code> \u2014 Custom app-state value, passed back as <code>?state=<\/code> after login","7":"<code>scope<\/code> \u2014 OAuth scope override (default: from plugin settings)","8":"<code>samepageredirect<\/code> \u2014 Redirect back to the current page after login: <code>0<\/code> (default) or <code>1<\/code>","9":"<p><code>redirect<\/code> \u2014 URL to redirect to after logout (default: home page)<\/p>\n\n<p>[docacc_logout redirect=\"https:\/\/example.com\/thank-you\"]<\/p>","10":"<code>post_type<\/code> \u2014 Comma-separated post type slugs (default: all public types)","11":"<code>show_protected<\/code> \u2014 <code>yes<\/code>, <code>no<\/code>, or <code>auto<\/code> (default: based on current authentication status)","12":"<code>depth<\/code> \u2014 Hierarchy depth limit, <code>0<\/code> = unlimited (default)","13":"<code>exclude<\/code> \u2014 Comma-separated post IDs to exclude"}},"plugin_section":[],"plugin_tags":[710,145655,145656,602,10315],"plugin_category":[38],"plugin_contributors":[267407],"plugin_business_model":[],"class_list":["post-293545","plugin","type-plugin","status-publish","hentry","plugin_tags-authentication","plugin_tags-doccheck","plugin_tags-hcp","plugin_tags-login","plugin_tags-medical","plugin_category-authentication","plugin_contributors-antwerpes","plugin_committers-antwerpes"],"banners":[],"icons":{"svg":false,"icon":"https:\/\/s.w.org\/plugins\/geopattern-icon\/doccheck-access.svg","icon_2x":false,"generated":true},"screenshots":[{"src":"https:\/\/ps.w.org\/doccheck-access\/assets\/screenshot-1.png?rev=3575047","caption":"General Settings overview."},{"src":"https:\/\/ps.w.org\/doccheck-access\/assets\/screenshot-2.png?rev=3575047","caption":"User Management with Anonymous Session selected."},{"src":"https:\/\/ps.w.org\/doccheck-access\/assets\/screenshot-3.png?rev=3575047","caption":"User Management with WordPress User selected."}],"raw_content":"<!--section=description-->\n<p>The DocCheck Access plugin integrates DocCheck's OAuth2 authentication system into your WordPress site, allowing medical professionals to log in using their DocCheck credentials.<\/p>\n\n<p>Note: Using DocCheck Access requires the Economy or Business license model. This plugin cannot be used with the Basic license model. Please contact DocCheck for details on available license models.<\/p>\n\n<h4>Features<\/h4>\n\n<ul>\n<li>Adds a DocCheck login button via shortcode or automatic page-level protection<\/li>\n<li>OAuth 2.0 Authorization Code flow with PKCE for secure authentication<\/li>\n<li>Two authentication modes: Anonymous Session and WordPress User creation<\/li>\n<li>Per-page and global content protection with role-based access control<\/li>\n<li>Configurable scope and user metadata mapping<\/li>\n<li>Template override support for protected pages<\/li>\n<li>Hooks and filters for developers to customize behavior<\/li>\n<\/ul>\n\n<h4>External Services<\/h4>\n\n<p>This plugin connects to the following external services:<\/p>\n\n<p><strong>DocCheck OAuth Server<\/strong> (<code>https:\/\/auth.doccheck.com<\/code>)<\/p>\n\n<p>Used to exchange the OAuth authorization code for an access token and to retrieve the authenticated user's profile data. This connection is only made when a visitor actively clicks the DocCheck login button. Please refer to the <a href=\"https:\/\/www.doccheck.com\/privacy\">DocCheck Privacy Policy<\/a> and <a href=\"https:\/\/www.doccheck.com\/terms\">DocCheck Terms of Service<\/a>.<\/p>\n\n<p><strong>DocCheck CDN<\/strong> (<code>https:\/\/dccdn.de<\/code>)<\/p>\n\n<p>The DocCheck login button is a web component whose script is served from DocCheck's CDN. It is loaded only on pages where the <code>[docacc_login]<\/code> shortcode or page-level protection is active \u2014 not on every page. Please refer to the <a href=\"https:\/\/www.doccheck.com\/privacy\">DocCheck Privacy Policy<\/a>.<\/p>\n\n<p>No data is transmitted to any other third-party service.<\/p>\n\n<h4>Requirements<\/h4>\n\n<ul>\n<li>WordPress 5.0 or higher<\/li>\n<li>PHP 7.2 or higher<\/li>\n<li>A DocCheck OAuth client ID and client secret (obtainable from DocCheck)<\/li>\n<\/ul>\n\n<h4>General Settings<\/h4>\n\n<p>Go to <strong>Settings &gt; DocCheck Login<\/strong> in your WordPress admin to configure the plugin. You can also open the settings directly from the <strong>Settings<\/strong> link on the WordPress plugins overview screen.<\/p>\n\n<p><strong>OAuth Credentials<\/strong><\/p>\n\n<ul>\n<li><strong>Client ID<\/strong> \u2014 Your DocCheck OAuth Client ID.<\/li>\n<li><strong>Client Secret<\/strong> \u2014 Your DocCheck OAuth Client Secret.<\/li>\n<li><strong>Redirect URI<\/strong> \u2014 Auto-generated based on your site URL. Copy this value into your DocCheck application settings.<\/li>\n<\/ul>\n\n<p><strong>Redirection &amp; Debug<\/strong><\/p>\n\n<ul>\n<li><strong>Default Target Page<\/strong> \u2014 The page users land on after a successful login.<\/li>\n<li><strong>Debug Mode<\/strong> \u2014 Logs detailed API and authentication information. Disable on production sites.<\/li>\n<\/ul>\n\n<p><strong>Content Protection<\/strong><\/p>\n\n<ul>\n<li><strong>Make all Pages Private<\/strong> \u2014 Requires DocCheck login for every page on the site.<\/li>\n<li><strong>Auto-assign Parent Configurations<\/strong> \u2014 Child pages automatically inherit their parent page's protection status.<\/li>\n<li><strong>Login Button Version<\/strong> \u2014 Pin a specific component version (e.g. <code>3.2.7<\/code>) or use <code>@latest<\/code> to always load the most recent version.<\/li>\n<\/ul>\n\n<h4>User Management<\/h4>\n\n<p><strong>Authentication Modes<\/strong><\/p>\n\n<ul>\n<li><strong>Anonymous Session<\/strong> \u2014 Users are authenticated via DocCheck but no WordPress user account is created. Data is held only for the duration of the PHP session and is not stored permanently.<\/li>\n<li><strong>WordPress User<\/strong> \u2014 A WordPress user account is created or linked on the visitor's first DocCheck login. Allows persistent storage of user properties and role-based access control.<\/li>\n<\/ul>\n\n<p><strong>Role &amp; Metadata<\/strong><\/p>\n\n<ul>\n<li><strong>Default User Role<\/strong> \u2014 The WordPress role assigned to newly created DocCheck users. Only low-privilege roles (those without <code>manage_options<\/code> or <code>edit_others_posts<\/code> capabilities) are available for selection. Administrator and Editor roles cannot be assigned to DocCheck users.<\/li>\n<li><strong>Automatic User Creation<\/strong> \u2014 Disabled by default. In WordPress User mode, local user creation for first-time DocCheck logins must be explicitly enabled by an administrator.<\/li>\n<li><strong>Scope &amp; Property Selection<\/strong> \u2014 Choose which DocCheck scopes to request and which user properties to store as WordPress user metadata.<\/li>\n<\/ul>\n\n<h4>Developer Hooks<\/h4>\n\n<p><strong>Actions<\/strong><\/p>\n\n<ul>\n<li><p><code>docacc_user_created<\/code> \u2014 Fires after a new WordPress user is created via DocCheck login.\nParameters: <code>$user_id<\/code> (int), <code>$user_data<\/code> (array)<\/p><\/li>\n<li><p><code>docacc_user_logged_in<\/code> \u2014 Fires when an existing user logs in via DocCheck.\nParameters: <code>$user_id<\/code> (int), <code>$user_data<\/code> (array)<\/p><\/li>\n<li><p><code>docacc_session_created<\/code> \u2014 Fires when a user is authenticated in anonymous session mode.\nParameters: <code>$user_data<\/code> (array)<\/p><\/li>\n<\/ul>\n\n<p><strong>Filters<\/strong><\/p>\n\n<ul>\n<li><p><code>docacc_map_role<\/code> \u2014 Customize role assignment based on DocCheck user data.\nParameters: <code>$current_role<\/code> (string), <code>$user_data<\/code> (array), <code>$user_id<\/code> (int)\nNote: roles with <code>manage_options<\/code> or <code>edit_others_posts<\/code> capabilities are silently rejected for security reasons.<\/p><\/li>\n<li><p><code>docacc_protected_template<\/code> \u2014 Override the template used for protected pages.\nParameters: <code>$template<\/code> (string)<\/p><\/li>\n<li><p><code>docacc_is_authenticated<\/code> \u2014 Override the authentication check result.\nParameters: <code>$authenticated<\/code> (bool)<\/p><\/li>\n<li><p><code>docacc_user_data<\/code> \u2014 Modify the DocCheck user data array before it is used.\nParameters: <code>$user_data<\/code> (array)<\/p><\/li>\n<\/ul>\n\n<h4>Template Functions<\/h4>\n\n<pre><code>\/\/ Check if the current visitor is authenticated via DocCheck\ndocacc_is_authenticated(); \/\/ returns bool\n\n\/\/ Get the authenticated user's DocCheck profile fields\ndocacc_get_user_data(); \/\/ returns array, empty if not authenticated\n<\/code><\/pre>\n\n<p>Example in a theme template:<\/p>\n\n<pre><code>&lt;?php if ( docacc_is_authenticated() ) : ?&gt;\n    &lt;div class=\"hcp-content\"&gt;Visible only to DocCheck users.&lt;\/div&gt;\n&lt;?php else : ?&gt;\n    &lt;?php echo do_shortcode( '[docacc_login]' ); ?&gt;\n&lt;?php endif; ?&gt;\n<\/code><\/pre>\n\n<h4>Custom Protected Page Template<\/h4>\n\n<p>Create <code>doccheck-protected.php<\/code> in your active theme directory \u2014 the plugin uses it automatically. Or override via filter:<\/p>\n\n<pre><code>add_filter( 'docacc_protected_template', function( $template ) {\n    return get_stylesheet_directory() . '\/my-protected-template.php';\n} );\n<\/code><\/pre>\n\n<h4>User Metadata Stored<\/h4>\n\n<p>In WordPress User mode, the following meta fields are stored per user (subject to selected scopes):<\/p>\n\n<ul>\n<li><code>docacc_unique_id<\/code> \u2014 DocCheck unique identifier (always stored)<\/li>\n<li><code>docacc_profession<\/code> \u2014 Profession name<\/li>\n<li><code>docacc_country<\/code> \u2014 Country ISO code<\/li>\n<li><code>docacc_language<\/code> \u2014 Interface language<\/li>\n<li><code>first_name<\/code>, <code>last_name<\/code> \u2014 Name fields<\/li>\n<li><code>docacc_email<\/code> \u2014 Email address<\/li>\n<li><code>docacc_discipline_name<\/code> \u2014 Medical discipline<\/li>\n<li><code>docacc_activity_name<\/code> \u2014 Activity type<\/li>\n<li><code>docacc_area_code<\/code>, <code>docacc_street<\/code>, <code>docacc_city<\/code>, <code>docacc_state<\/code> \u2014 Address fields<\/li>\n<li><code>docacc_last_login<\/code> \u2014 Timestamp of last DocCheck login<\/li>\n<\/ul>\n\n<!--section=installation-->\n<ol>\n<li>Upload the <code>doccheck-access<\/code> folder to the <code>\/wp-content\/plugins\/<\/code> directory.<\/li>\n<li>Activate the plugin through the <strong>Plugins<\/strong> menu in WordPress.<\/li>\n<li>Go to <strong>Settings &gt; DocCheck Login<\/strong> and enter your DocCheck OAuth credentials.<\/li>\n<li>Copy the displayed <strong>Redirect URI<\/strong> into your DocCheck application settings.<\/li>\n<li>Add <code>[docacc_login]<\/code> to any page or post where you want the login button to appear.<\/li>\n<\/ol>\n\n<!--section=faq-->\n<dl>\n<dt id=\"how%20do%20i%20get%20doccheck%20oauth%20credentials%3F\"><h3>How do I get DocCheck OAuth credentials?<\/h3><\/dt>\n<dd><p>Contact DocCheck to register your application and obtain a client ID and client secret.<\/p><\/dd>\n<dt id=\"can%20i%20customize%20the%20appearance%20of%20the%20login%20button%3F\"><h3>Can I customize the appearance of the login button?<\/h3><\/dt>\n<dd><p>Yes. The <code>[docacc_login]<\/code> shortcode accepts a <code>size<\/code> attribute (<code>small<\/code>, <code>medium<\/code>, <code>large<\/code>). You can also apply custom CSS to the <code>dc-login-button<\/code> element.<\/p><\/dd>\n<dt id=\"how%20does%20user%20creation%20work%3F\"><h3>How does user creation work?<\/h3><\/dt>\n<dd><p>In WordPress User mode, a new account is created on the visitor's first DocCheck login. The DocCheck unique ID is stored as user meta (<code>docacc_unique_id<\/code>) and used to match subsequent logins to the same account.<\/p><\/dd>\n<dt id=\"can%20i%20map%20doccheck%20user%20types%20to%20specific%20wordpress%20roles%3F\"><h3>Can I map DocCheck user types to specific WordPress roles?<\/h3><\/dt>\n<dd><p>Yes. Use the <code>docacc_map_role<\/code> filter:<\/p>\n\n<pre><code>add_filter( 'docacc_map_role', function( $role, $user_data, $user_id ) {\n    if ( isset( $user_data['profession'] ) &amp;&amp; $user_data['profession'] === 'physician' ) {\n        return 'editor';\n    }\n    return $role;\n}, 10, 3 );\n<\/code><\/pre><\/dd>\n<dt id=\"how%20do%20i%20protect%20a%20single%20page%3F\"><h3>How do I protect a single page?<\/h3><\/dt>\n<dd><p>Edit the page in the WordPress admin. A <strong>DocCheck Protection<\/strong> metabox appears in the sidebar \u2014 check <strong>Protect this page<\/strong> and save.<\/p><\/dd>\n<dt id=\"can%20i%20protect%20all%20pages%20at%20once%3F\"><h3>Can I protect all pages at once?<\/h3><\/dt>\n<dd><p>Yes. Enable <strong>Make all Pages Private<\/strong> under <strong>Settings &gt; DocCheck Login<\/strong>.<\/p><\/dd>\n\n<\/dl>\n\n<!--section=changelog-->\n<h4>1.0.6<\/h4>\n\n<ul>\n<li>Added a direct <strong>Settings<\/strong> link to the plugin row on the WordPress plugins overview screen for faster access to <code>options-general.php?page=doccheck-access<\/code>.<\/li>\n<\/ul>\n\n<h4>1.0.5<\/h4>\n\n<ul>\n<li>Review fix: Removed WordPress auth salt usage from OAuth state. The state parameter now contains only a nonce, while redirect and tracking data are kept server-side in a one-time transient.<\/li>\n<li>Review fix: Recursively sanitize DocCheck anonymous-session data before storing and before exposing it through helper APIs.<\/li>\n<li>Review fix: Updated the WordPress.org contributors field to the plugin owner username.<\/li>\n<\/ul>\n\n<h4>1.0.4<\/h4>\n\n<ul>\n<li>Review fix: Sanitized the <code>wp_list_pages()<\/code> HTML returned by the <code>[docacc_sitemap]<\/code> shortcode before concatenating it into shortcode output.<\/li>\n<\/ul>\n\n<h4>1.0.3<\/h4>\n\n<ul>\n<li>Review fix: Renamed plugin-owned global identifiers to the unique <code>docacc<\/code> prefix, including functions, classes, constants, options, hooks, transients, session keys, user meta keys, role slug, and shortcodes.<\/li>\n<li>Review fix: Replaced shortcodes with <code>[docacc_login]<\/code>, <code>[docacc_hide_content]<\/code>, <code>[docacc_logout]<\/code>, and <code>[docacc_sitemap]<\/code>.<\/li>\n<li>Review fix: Removed plugin-owned <code>class_exists()<\/code> and <code>function_exists()<\/code> wrappers to avoid silent conflicts with other plugins or themes.<\/li>\n<li>Review fix: Updated the OAuth callback query var, settings option, admin documentation, developer hooks, and examples to use the <code>docacc<\/code> prefix consistently.<\/li>\n<li>Compatibility: Added idempotent settings initialization so the renamed settings option is created safely during updates as well as new activations.<\/li>\n<\/ul>\n\n<h4>1.0.2<\/h4>\n\n<ul>\n<li>Security: Restricted the Default User Role dropdown to low-privilege roles only (excludes roles with <code>manage_options<\/code> or <code>edit_others_posts<\/code>).<\/li>\n<li>Security: Added server-side validation in <code>validate_settings()<\/code> to reject high-privilege roles even if submitted directly.<\/li>\n<li>Security: The <code>docacc_map_role<\/code> filter result is now validated before <code>set_role()<\/code> is called, preventing privilege escalation via custom filter callbacks.<\/li>\n<li>Security: Added explicit opt-in for automatic local user creation (<code>allow_user_creation<\/code>), defaulted to off, and defaulted new installs to Anonymous Session mode.<\/li>\n<\/ul>\n\n<h4>1.0.1<\/h4>\n\n<ul>\n<li>Review fix: Replaced inline <code>&lt;script&gt;<\/code> and <code>&lt;style&gt;<\/code> output with proper WordPress enqueue APIs.<\/li>\n<li>Added admin JavaScript through <code>admin_enqueue_scripts<\/code> + <code>wp_add_inline_script()<\/code> for settings tabs, scope\/property matrix behavior, redirect URI copy button, and metabox role toggle.<\/li>\n<li>Moved matrix CSS and protected fallback template CSS into enqueued stylesheet assets.<\/li>\n<li>Review fix: Updated <code>register_setting()<\/code> arguments and adjusted <code>client_secret<\/code> sanitization to use a dedicated secret-safe callback instead of generic text-field sanitization.<\/li>\n<li>Review fix: Escaped shortcode callback return output for <code>docacc_logout<\/code> and sanitized rendered <code>docacc_hide_content<\/code> output with <code>wp_kses_post()<\/code>.<\/li>\n<li>Review fix: Removed global session start behavior and introduced lazy, cookie-aware session initialization only in DocCheck authentication\/session contexts.<\/li>\n<\/ul>\n\n<h4>1.0.0<\/h4>\n\n<ul>\n<li>Initial release.<\/li>\n<\/ul>","raw_excerpt":"Integrate DocCheck OAuth2 login functionality into your WordPress site.","jetpack_sharing_enabled":true,"_links":{"self":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin\/293545","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin"}],"about":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/types\/plugin"}],"replies":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/comments?post=293545"}],"author":[{"embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wporg\/v1\/users\/antwerpes"}],"wp:attachment":[{"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/media?parent=293545"}],"wp:term":[{"taxonomy":"plugin_section","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_section?post=293545"},{"taxonomy":"plugin_tags","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_tags?post=293545"},{"taxonomy":"plugin_category","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_category?post=293545"},{"taxonomy":"plugin_contributors","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_contributors?post=293545"},{"taxonomy":"plugin_business_model","embeddable":true,"href":"https:\/\/wordpress.org\/plugins\/wp-json\/wp\/v2\/plugin_business_model?post=293545"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}