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

Yoast / wordpress-seo / e69c2e79c97a57e26aa5c15ba3ca2a387f561b7d

02 Mar 2026 03:20PM UTC coverage: 53.204% (-0.7%) from 53.915%
e69c2e79c97a57e26aa5c15ba3ca2a387f561b7d

Pull #23031

github

web-flow
Merge 25ffa8e80 into 4ff1bc18e
Pull Request #23031: Refactor ai organization

5938 of 10669 branches covered (55.66%)

Branch coverage included in aggregate %.

718 of 759 new or added lines in 38 files covered. (94.6%)

718 existing lines in 33 files now uncovered.

21852 of 41564 relevant lines covered (52.57%)

71980.72 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