Changeset 11850 for sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/meetup/class-meetup-oauth2-client.php
- Timestamp:
- 05/17/2022 11:25:58 PM (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
sites/trunk/wordpress.org/public_html/wp-content/plugins/official-wordpress-events/meetup/class-meetup-oauth2-client.php
r11498 r11850 128 128 /** 129 129 * Request one of various types of tokens from the Meetup OAuth API. 130 * 130 * 131 131 * Setting $type to 'access_token' is for step 2 of the oAuth flow. This takes a code that has been previously set 132 132 * through a user-initiated oAuth authentication. 133 * 133 * 134 134 * Setting $type to 'refresh_token' will request a new access_token generated through the above access_token method. 135 135 * … … 150 150 $request_body = array(); 151 151 152 switch ( $type ) {152 switch ( $type ) { 153 153 case 'access_token': // Request a new access token. 154 154 $args = wp_parse_args( $args, array( … … 156 156 ) ); 157 157 158 $request_url = self::URL_ACCESS_TOKEN;159 $request_body = array(158 $request_url = self::URL_ACCESS_TOKEN; 159 $request_body = array( 160 160 'client_id' => self::CONSUMER_KEY, 161 161 'client_secret' => self::CONSUMER_SECRET, … … 238 238 if ( ! $_GET['code'] ) { 239 239 $message = sprintf( 240 "Meetup.com oAuth expired. Please access the following url while logged into the %s meetup.com account: \n\n%s\n\n" . 240 "Meetup.com oAuth expired. Please access the following url while logged into the %s meetup.com account: \n\n%s\n\n" . 241 241 "For sites other than WordCamp Central, the ?code=... parameter will need to be stored on this site via wp-cli and this task run again: `wp --url=%s site option update '%s' '...'`", 242 242 self::EMAIL, … … 265 265 delete_site_option( self::SITE_OPTION_KEY_AUTHORIZATION, false ); 266 266 } 267 268 267 } elseif ( $this->is_expired_token( $token ) ) { 269 268 $token = $this->request_token( 'refresh_token', $token );
Note: See TracChangeset
for help on using the changeset viewer.