# Authentication

Within the MAT architecture, all authentication and authorization services are managed by a dedicated component called the Auth Manager. The goal of this discussion is not to explain how this component works but rather to show how it can be used to gain access to the MAT APIs. A detailed description of the Auth Manager service can be found in the dedicated guide.

{% embed url="<https://40factory.gitbook.io/mat-auth-manager>" %}

### Cloud Configuration Case

A Cloud configuration occurs when the MAT application is accessible via the Internet through an agreed domain. In these configurations, the data is stored in the Cloud.

To use MAT APIs in a Cloud configuration, there are two fundamental prerequisites:

* correctly configuring an application registration for the project;
* obtaining a valid token that allows you to query the service.

The following sections will outline the procedures to accomplish these operations:

<table data-card-size="large" data-view="cards"><thead><tr><th data-card-target data-type="content-ref"></th></tr></thead><tbody><tr><td><a href="authentication/cloud-case/application-registration">application-registration</a></td></tr><tr><td><a href="authentication/cloud-case/token-acquisition">token-acquisition</a></td></tr></tbody></table>

### Edge Configuration Case

An Edge configuration occurs when the data recorded on the machine is not transferred to the Cloud but remains stored on the machine's PC. In this type of configuration, the MAT web app is not accessible via the Internet. Instead, it is necessary to be connected to the same network as the machine to access it.

To use MAT APIs in an Edge configuration, it is necessary to enable the use of Basic authentication. The section below provides information on how to configure it:

<table data-view="cards"><thead><tr><th></th><th></th><th></th></tr></thead><tbody><tr><td><a href="authentication/edge-case/basic-authentication">Basic Authentication</a></td><td></td><td></td></tr></tbody></table>
