PHP Class WC_Auth

Afficher le fichier Open project: woocommerce/woocommerce Class Usage Examples

Méthodes publiques

Méthode Description
__construct ( ) Setup class.
add_endpoint ( ) Add auth endpoint.
add_query_vars ( array $vars ) : string[] Add query vars.
handle_auth_requests ( ) Handle auth requests.

Méthodes protégées

Méthode Description
auth_endpoint ( string $route ) Auth endpoint.
build_url ( array $data, string $endpoint ) : string Build auth urls.
create_keys ( string $app_name, string $app_user_id, string $scope ) : array Create keys.
get_formatted_url ( string $url ) : array Decode and format a URL.
get_i18n_scope ( string $scope ) : string Get scope name.
get_permissions_in_scope ( string $scope ) : array Return a list of permissions a scope allows.
make_validation ( ) Make validation.
post_consumer_data ( array $consumer_data, string $url ) : boolean Post consumer data.

Private Methods

Méthode Description
maybe_delete_key ( array $key ) Maybe delete key.

Method Details

__construct() public méthode

Setup class.
Since: 2.4.0
public __construct ( )

add_endpoint() public static méthode

Add auth endpoint.
Since: 2.4.0
public static add_endpoint ( )

add_query_vars() public méthode

Add query vars.
Since: 2.4.0
public add_query_vars ( array $vars ) : string[]
$vars array
Résultat string[]

auth_endpoint() protected méthode

Auth endpoint.
Since: 2.4.0
protected auth_endpoint ( string $route )
$route string

build_url() protected méthode

Build auth urls.
Since: 2.4.0
protected build_url ( array $data, string $endpoint ) : string
$data array
$endpoint string
Résultat string

create_keys() protected méthode

Create keys.
Since: 2.4.0
protected create_keys ( string $app_name, string $app_user_id, string $scope ) : array
$app_name string
$app_user_id string
$scope string
Résultat array

get_formatted_url() protected méthode

Decode and format a URL.
protected get_formatted_url ( string $url ) : array
$url string
Résultat array

get_i18n_scope() protected méthode

Get scope name.
Since: 2.4.0
protected get_i18n_scope ( string $scope ) : string
$scope string
Résultat string

get_permissions_in_scope() protected méthode

Return a list of permissions a scope allows.
Since: 2.4.0
protected get_permissions_in_scope ( string $scope ) : array
$scope string
Résultat array

handle_auth_requests() public méthode

Handle auth requests.
Since: 2.4.0

make_validation() protected méthode

Make validation.
Since: 2.4.0
protected make_validation ( )

post_consumer_data() protected méthode

Post consumer data.
Since: 2.4.0
protected post_consumer_data ( array $consumer_data, string $url ) : boolean
$consumer_data array
$url string
Résultat boolean