You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Commit 890787e
Browse filesBrowse the repository at this point in the historyBrowse files
same(true, $refused, 'A modified block grant is refused.');
77
+
78
+
79
+
$challenge = '';
80
+
$GLOBALS['transport'] = function ($url, $args) use (&$challenge) {
81
+
if (str_ends_with($url, '/register')) {
82
+
$registration = json_decode($args['body'], true);
83
+
same('none', $registration['token_endpoint_auth_method'], 'Frames registers a public client for person authority.');
84
+
same(array(admin_url('options-general.php?page=spacefast-frames&spacefast_oauth=callback')), $registration['redirect_uris'], 'The complete callback query is registered.');
same(false, array_key_exists('client_secret', $fields), 'Person grants do not send a client secret.');
89
+
same('frames-test-client', $fields['client_id'], 'The registered client owns the token request.');
90
+
if ($fields['grant_type'] === 'authorization_code') {
91
+
same($challenge, rtrim(strtr(base64_encode(hash('sha256', $fields['code_verifier'], true)), '+/', '-_'), '='), 'The exchange proves the authorize request PKCE challenge.');
92
+
same(admin_url('options-general.php?page=spacefast-frames&spacefast_oauth=callback'), $fields['redirect_uri'], 'The exchange preserves the registered callback.');
0 commit comments