Linux 软件免费装
Banner图

DocCheck Access

开发者 antwerpes
DocCheck agency
更新时间 2026年7月3日 06:15
PHP版本: 8.0 及以上
WordPress版本: 7.0
版权: GPLv2 or later
版权网址: 版权信息

标签

login authentication medical DocCheck hcp

下载

1.0.9 1.0.6 1.0.7 1.0.8

详情介绍:

The DocCheck Access plugin integrates DocCheck's OAuth2 authentication system into your WordPress site, allowing medical professionals to log in using their DocCheck credentials. 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. Features External Services This plugin connects to the following external services: DocCheck OAuth Server (https://auth.doccheck.com) 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 DocCheck Privacy Policy and DocCheck Terms of Service. DocCheck CDN (https://dccdn.de) The DocCheck login button is a web component whose script is served from DocCheck's CDN. It is loaded only on pages where the [docacc_login] shortcode or page-level protection is active — not on every page. Please refer to the DocCheck Privacy Policy. No data is transmitted to any other third-party service. Requirements General Settings Go to Settings > DocCheck Login in your WordPress admin to configure the plugin. You can also open the settings directly from the Settings link on the WordPress plugins overview screen. OAuth Credentials Redirection & Debug Content Protection Restrict Options before Login User Management Authentication Modes Role & Metadata

安装:

  1. Upload the doccheck-access folder to the /wp-content/plugins/ directory.
  2. Activate the plugin through the Plugins menu in WordPress.
  3. Go to Settings > DocCheck Login and enter your DocCheck OAuth credentials.
  4. Copy the displayed Redirect URI into your DocCheck application settings.
  5. Add [docacc_login] to any page or post where you want the login button to appear.

屏幕截图:

  • User Management with Anonymous Session selected.
  • User Management with WordPress User selected.

升级注意事项:

1.0.8 Adds configurable pre-login handling for protected pages, including redirect-to-login-page support with return-to-page behavior after authentication. 1.0.7 Prevents cached DocCheck login and protected-page responses from reusing one-time OAuth state or stale access output. 1.0.6 Adds a direct Settings link on the WordPress plugins overview screen for faster access to the plugin configuration page. 1.0.5 OAuth state handling no longer exposes WordPress auth salts, and session user data is recursively sanitized. 1.0.4 The sitemap shortcode now sanitizes generated hierarchical page-list HTML before returning it. 1.0.3 Shortcodes and developer-facing identifiers now use the docacc prefix. Update any content or custom code that referenced older shortcode or hook names. 1.0.0 Initial release.

其他记录:

Developer Hooks Actions Filters Template Functions // Check if the current visitor is authenticated via DocCheck docacc_is_authenticated(); // returns bool // Get the authenticated user's DocCheck profile fields docacc_get_user_data(); // returns array, empty if not authenticated Example in a theme template: Visible only to DocCheck users. Custom Protected Page Template The plugin provides a default template for pages that are DocCheck protected. You can customize this in two ways. Theme Template File Create doccheck-protected.php in your active theme root. The plugin will load it automatically instead of the built-in fallback template. This content is protected. Please log in with your DocCheck account to continue. WordPress Filter Use the docacc_protected_template filter in your theme's functions.php when you want to load a template from a custom location. add_filter( 'docacc_protected_template', function( $template ) { $custom_template = get_stylesheet_directory() . '/templates/doccheck/custom-protected.php'; if ( file_exists( $custom_template ) ) { return $custom_template; } return $template; } ); How the template is used: the plugin loads this template only for singular protected content when the visitor is not authenticated. Your template runs as a normal WordPress theme template, so you can use functions like get_header(), get_footer(), the_title(), and do_shortcode(). In most cases, you should render the login button with [docacc_login samepageredirect="1"] so the user returns to the same protected page after login. User Metadata Stored In WordPress User mode, the following meta fields are stored per user (subject to selected scopes):

常见问题:

How do I get DocCheck OAuth credentials?

Contact DocCheck to register your application and obtain a client ID and client secret.

Can I customize the appearance of the login button?

Yes. The [docacc_login] shortcode accepts a size attribute (small, medium, large). You can also apply custom CSS to the dc-login-button element.

How does user creation work?

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 (docacc_unique_id) and used to match subsequent logins to the same account.

Can I map DocCheck user types to specific WordPress roles?

Yes. Use the docacc_map_role filter: add_filter( 'docacc_map_role', function( $role, $user_data, $user_id ) { if ( isset( $user_data['profession'] ) && $user_data['profession'] === 'physician' ) { return 'editor'; } return $role; }, 10, 3 );

How do I protect a single page?

Edit the page in the WordPress admin. A DocCheck Protection metabox appears in the sidebar — check Protect this page and save.

Can I protect all pages at once?

Yes. Enable Make all Pages Private under Settings > DocCheck Login.

更新日志:

1.0.8 1.0.7 1.0.6 1.0.5 1.0.4 1.0.3 1.0.2 1.0.1 1.0.0