Class WC_API_Authentication

Package: WooCommerce\API
Author: WooThemes
Located at includes/api/class-wc-api-authentication.php

Methods summary

public WC_API_Authentication
# __construct( )

Setup class

Setup class

Returns

WC_API_Authentication

Since

2.1
public null|WP_Error|WP_User
# authenticate( WP_User $user )

Authenticate the request. The authentication method varies based on whether the request was made over SSL or not.

Authenticate the request. The authentication method varies based on whether the request was made over SSL or not.

Parameters

$user
WP_User
$user

Returns

null|WP_Error|WP_User

Since

2.1
public
# check_api_key_permissions( WP_User $user )

Check that the API keys provided have the proper key-specific permissions to either read or write API resources

Check that the API keys provided have the proper key-specific permissions to either read or write API resources

Parameters

$user
WP_User
$user

Throws

Exception
if the permission check fails

Magic methods summary

WooCommerce API documentation generated by ApiGen 2.8.0