Kernel::WebApp::Controller::API::Role::AllowsCustomerAuthentication

Table of Contents

NAME

Kernel::WebApp::Controller::API::Role::AllowsCustomerAuthentication – Allow the usage of a valid customer token.

PUBLIC INTERFACE

Just consume this role to make sure that your endpoint can be used by customers with or without a valid token:

    with qw(
        Kernel::WebApp::Controller::API::Role::AllowsCustomerAuthentication
    )

It works by wrapping a default implementation around Kernel::WebApp::Controller::API::Base::Authenticate(), which requires processes the customer token if present and provides the customer login in the attribute AuthenticatedCustomerUserLogin.

You can still provide your own Authenticate() method to perform additional checks in the endpoint.

See also Kernel::WebApp::Controller::API::Role::RequiresCustomerAuthentication.

Scroll to Top