auth Action #

⚠️ Deprecated: → use a security scheme with type: basic instead

The auth action implements HTTP Basic authentication between the client and FLAT. It is useful to protect APIs under development.

Syntax #

An auth action contains a list of user elements which have the following attributes:

Usage #

If the client has not sent authentication credentials, a 401 Authentication Required status is returned and the flow is halted. In a subsequent request with credentials matching a configured user, the action does not halt the flow.

📎 Basic authentication does not provide strong protection, as no encryption is used. You should only use it on HTTPS connections.

Example #

<auth>
  <user pass="top secret" />

  <user name="fred" pass="wilma" />
  <!-- repeated user is ignored -->
  <user name="fred" pass="betty" />
</auth>

📎 Only the first match is evaluated if user names are repeated.

Errors #

The following cases are considered fatal and will terminate the request: