Kernel::WebApp::Controller::API::Role::RequiresCustomerAuthentication

Table of Contents

NAME

Kernel::WebApp::Controller::API::Role::RequiresCustomerAuthentication – Require a valid customer token.

PUBLIC INTERFACE

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

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

It works by wrapping a default implementation around Kernel::WebApp::Controller::API::Base::Authenticate(), which requires a valid token or otherwise sends a 401 Unauthenticated response.

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

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

Scroll to Top