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

Yoast / wordpress-seo / ed2f09d63cc1d52576867547263198acaf3ad466

20 Mar 2026 01:43PM UTC coverage: 53.47% (-0.4%) from 53.917%
ed2f09d63cc1d52576867547263198acaf3ad466

push

github

vraja-pro
Merge branch 'trunk' into feature/next-post

9048 of 16621 branches covered (54.44%)

Branch coverage included in aggregate %.

860 of 946 new or added lines in 55 files covered. (90.91%)

709 existing lines in 34 files now uncovered.

34343 of 64529 relevant lines covered (53.22%)

46616.39 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