code standards
This commit is contained in:
parent
1f62a53e0e
commit
512d77fb4c
|
@ -36,15 +36,17 @@ class WC_API_Authentication {
|
|||
public function authenticate( $user ) {
|
||||
|
||||
// allow access to the index by default
|
||||
if ( '/' === WC()->api->server->path )
|
||||
if ( '/' === WC()->api->server->path ) {
|
||||
return new WP_User( 0 );
|
||||
}
|
||||
|
||||
try {
|
||||
|
||||
if ( is_ssl() )
|
||||
if ( is_ssl() ) {
|
||||
$user = $this->perform_ssl_authentication();
|
||||
else
|
||||
} else {
|
||||
$user = $this->perform_oauth_authentication();
|
||||
}
|
||||
|
||||
// check API key-specific permission
|
||||
$this->check_api_key_permissions( $user );
|
||||
|
|
Loading…
Reference in New Issue