LLMS_REST_Authentication::__construct()
Constructor
Contents
Source Source
File: libraries/lifterlms-rest/includes/class-llms-rest-authentication.php
public function __construct() { /** * Disable LifterLMS REST API Key authentication in favor of a custom authentication solution. * * @param bool $use_auth When true, LifterLMS Basic (or header) authorization will be used. */ $use_auth = apply_filters( 'llms_rest_use_authentication', true ); if ( $use_auth ) { add_filter( 'determine_current_user', array( $this, 'authenticate' ), 15 ); add_filter( 'rest_authentication_errors', array( $this, 'check_authentication_error' ), 15 ); add_filter( 'rest_post_dispatch', array( $this, 'send_unauthorized_headers' ), 50 ); add_filter( 'rest_pre_dispatch', array( $this, 'check_permissions' ), 10, 3 ); } }
Expand full source code Collapse full source code View on GitHub
Changelog Changelog
Version | Description |
---|---|
1.0.0-beta.1 | Introduced. |