Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
justingreerbbi committed Feb 8, 2016
1 parent 3c791cc commit f02c994
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 17 deletions.
7 changes: 2 additions & 5 deletions library/class-wo-api.php
Original file line number Diff line number Diff line change
Expand Up @@ -211,12 +211,11 @@
if ( array_key_exists( $method, $ext_methods ) ) {

// If the method is is set to public, lets just run the method without
if( isset($ext_methods[$method]['public']) && $ext_methods[$method]['public'] ){
if( isset( $ext_methods[$method]['public'] ) && $ext_methods[$method]['public'] ){
call_user_func_array($ext_methods[$method]['func'], $_REQUEST);
exit;
}

// Check the token provided
$response = new OAuth2\Response();
if ( ! $server->verifyResourceRequest( OAuth2\Request::createFromGlobals() ) ) {
$response->setError(400, 'invalid_request', 'Missing or invalid parameter(s)');
Expand All @@ -229,11 +228,9 @@
exit;
}

/** added 3.1.91 */
do_action('wo_endpoint_user_authenticated', array( $token ) );

// Once we are here, everything has checked out. Call the method
call_user_func_array( $ext_methods[$method]['func'], array( $token ) );

exit;
}

Expand Down
13 changes: 1 addition & 12 deletions wp-oauth-main.php
Original file line number Diff line number Diff line change
Expand Up @@ -52,19 +52,8 @@ function __construct() {
}
spl_autoload_register( array( $this, 'autoload') );

/**
* Custom Authentication Hook
* This MUST run before anything just to be safe.
*
* @since 3.1.3
*/

add_filter( 'determine_current_user', array($this, '_wo_authenicate_bypass'), 21);

/**
* load all dependents
*
* @since 1.0.0
*/
add_action("init", array(__CLASS__, "includes"));

}
Expand Down

0 comments on commit f02c994

Please sign in to comment.