We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d04c82f commit 3ab833cCopy full SHA for 3ab833c
authorize-page.php
@@ -65,8 +65,19 @@ public function render_page() {
65
if ( ! empty( $_POST['wp-submit'] ) ) {
66
check_admin_referer( 'json_oauth1_authorize' );
67
68
- $authenticator->authorize_request_token( $_REQUEST['oauth_token'] );
69
- exit;
+ switch ( $_POST['wp-submit'] ) {
+ case 'authorize':
70
+ $authenticator->authorize_request_token( $this->token['key'] );
71
+ exit;
72
+
73
+ case 'cancel':
74
75
76
+ default:
77
+ $error = new WP_Error( 'json_oauth1_invalid_action', __( 'Invalid authorization action' ), array( 'status' => 400 ) );
78
+ $this->display_error( $error );
79
80
+ }
81
}
82
83
$file = locate_template( 'oauth1-authorize.php' );
0 commit comments