• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Yoast / wordpress-seo / c710c31289d8b4f262939f3a3ca36271a63cce16

13 Mar 2026 09:22AM UTC coverage: 53.449% (+2.5%) from 50.9%
c710c31289d8b4f262939f3a3ca36271a63cce16

push

github

leonidasmi
Merge branch 'trunk' into feature/task-list-phase-3

9052 of 16649 branches covered (54.37%)

Branch coverage included in aggregate %.

828 of 870 new or added lines in 44 files covered. (95.17%)

718 existing lines in 33 files now uncovered.

34354 of 64561 relevant lines covered (53.21%)

46593.28 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/src/ai-authorization/user-interface/refresh-callback-route.php
1
<?php
2

3
// phpcs:disable Yoast.NamingConventions.NamespaceName.TooLong -- Needed in the folder structure.
4
namespace Yoast\WP\SEO\AI_Authorization\User_Interface;
5

6
/**
7
 * Registers the callback route used in the authorization process.
8
 *
9
 * @makePublic
10
 *
11
 * @phpcs:disable Yoast.NamingConventions.ObjectNameDepth.MaxExceeded
12
 */
13
class Refresh_Callback_Route extends Abstract_Callback_Route {
14

15
        /**
16
         *  The prefix for this route.
17
         *
18
         * @var string
19
         */
20
        public const ROUTE_PREFIX = '/ai_generator/refresh_callback';
21

22
        /**
23
         * Registers routes with WordPress.
24
         *
25
         * @return void
26
         */
UNCOV
27
        public function register_routes() {
×
UNCOV
28
                \register_rest_route(
×
UNCOV
29
                        parent::ROUTE_NAMESPACE,
×
UNCOV
30
                        self::ROUTE_PREFIX,
×
UNCOV
31
                        [
×
UNCOV
32
                                'methods'             => 'POST',
×
UNCOV
33
                                'args'                => [
×
UNCOV
34
                                        'access_jwt'     => [
×
UNCOV
35
                                                'required'    => true,
×
UNCOV
36
                                                'type'        => 'string',
×
UNCOV
37
                                                'description' => 'The access JWT.',
×
UNCOV
38
                                        ],
×
UNCOV
39
                                        'refresh_jwt'    => [
×
UNCOV
40
                                                'required'    => true,
×
UNCOV
41
                                                'type'        => 'string',
×
UNCOV
42
                                                'description' => 'The JWT to be used when the access JWT needs to be refreshed.',
×
UNCOV
43
                                        ],
×
UNCOV
44
                                        'code_challenge' => [
×
UNCOV
45
                                                'required'    => true,
×
UNCOV
46
                                                'type'        => 'string',
×
UNCOV
47
                                                'description' => 'The SHA266 of the verification code used to check the authenticity of a callback call.',
×
UNCOV
48
                                        ],
×
UNCOV
49
                                        'user_id'        => [
×
UNCOV
50
                                                'required'    => true,
×
UNCOV
51
                                                'type'        => 'integer',
×
UNCOV
52
                                                'description' => 'The id of the user associated to the code verifier.',
×
UNCOV
53
                                        ],
×
UNCOV
54
                                ],
×
UNCOV
55
                                'callback'            => [ $this, 'callback' ],
×
UNCOV
56
                                'permission_callback' => '__return_true',
×
UNCOV
57
                        ],
×
UNCOV
58
                );
×
59
        }
60
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc