---
name: "auth_meta"
section: "3"
platform: "linux"
package: "courier-authlib-dev"
version: "0.72.4-1"
release: "Debian 13 (Trixie)"
platforms: ["linux"]
url: "https://new.carta.tech/auth_meta"
---

# auth\_meta(3)

Authentication metadata

## NAME

auth\_meta - Authentication metadata

## SYNOPSIS

```
#include <courierauth.h>
```

**struct auth\_meta \*meta=auth\_meta\_init\_default(void);**

**void auth\_meta\_destroy\_default(struct auth\_meta \****meta***);**

## DESCRIPTION

The auth\_meta structure provides additional, optional metadata for [**auth\_login\_meta**(3)](/auth_login_meta/3.md), [**auth\_generic\_meta**(3)](/auth_generic_meta/3.md), and [**auth\_getuserinfo\_meta**(3)](/auth_getuserinfo_meta/3.md).

```
struct auth_meta {
    char **envvars;
};
```

Description of the above fields:

envvars

An array of opaque “*name*=*value*” strings, ending with a null pointer.

The library recognizes the following *envvars* variables:

TCPREMOTEIP

The IP address the authentication request came from.

### Initializing a default auth\_meta

**auth\_meta\_init\_default** creates an auth\_meta with default values. A NULL pointer gets returned if the object could not be created. **auth\_meta\_destroy\_default** frees the object and all memory used by it, after it is no longer needed.

Typical usage:

• **auth\_meta\_init\_default** gets called to create an auth\_meta.

• The pointer to the new auth\_meta gets passed to [**auth\_login\_meta**(3)](/auth_login_meta/3.md), [**auth\_generic\_meta**(3)](/auth_generic_meta/3.md) or [**auth\_getuserinfo\_meta**(3)](/auth_getuserinfo_meta/3.md).

• **auth\_meta\_destroy\_default** deallocates and frees auth\_meta's memory.

### Default auth\_meta values

**auth\_meta\_init\_default** creates an auth\_meta with the following values:

• The **TCPREMOTEIP** environment variable, if set, is placed in the TCPREMOTEIP *envvars*

## SEE ALSO

[**authlib**(3)](/authlib/3.md)\[1\], [**auth\_login\_meta**(3)](/auth_login_meta/3.md)\[2\], [**auth\_generic\_meta**(3)](/auth_generic_meta/3.md)\[3\], [**auth\_getuserinfo\_meta**(3)](/auth_getuserinfo_meta/3.md)\[4\]

## NOTES

- 1\.

  [**authlib**(3)](/authlib/3.md)

  http://www.courier-mta.org/authlib/authlib.html

- 2\.

  [**auth\_login\_meta**(3)](/auth_login_meta/3.md)

  http://www.courier-mta.org/authlib/auth\_login.html

- 3\.

  [**auth\_generic\_meta**(3)](/auth_generic_meta/3.md)

  http://www.courier-mta.org/authlib/auth\_generic.html

- 4\.

  [**auth\_getuserinfo\_meta**(3)](/auth_getuserinfo_meta/3.md)

  http://www.courier-mta.org/authlib/auth\_getuserinfo.html
