# AuthDataClient

Location: [gRPC API](https://developer.m-files.com/APIs/gRPC-API/index.md) > [Reference](https://developer.m-files.com/APIs/gRPC-API/Reference/index.md) > [Messages](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/index.md)

HTML version: https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AuthDataClient/

The client's authentication data in a [LogIn](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/LogIn/index.md) call: the method in
`type` and its data in the matching member of `data`.

- **Full name:** `MFiles.AuthDataClient`
- **Proto file:** [`mfiles/structs.proto`](https://developer.m-files.com/APIs/gRPC-API/downloads/proto/mfiles/structs.proto)

<a id="fields"></a>

## Fields

| Field | Type | Number | Description |
|---|---|---|---|
| <a id="f-type"></a>`type` | [`AuthDataType`](https://developer.m-files.com/APIs/gRPC-API/Reference/Enums/MFiles.AuthDataType/index.md) | 1 | The authentication method. Must match the member set in `data`; unset fails with `E_INVALIDARG`. For user name and password use `AUTH_DATA_TYPE_CREDENTIALS`. Values: `AUTH_DATA_TYPE_UNDEFINED` (0), `AUTH_DATA_TYPE_MFILES_LEG1` (1), `AUTH_DATA_TYPE_MFILES_LEG2` (2), `AUTH_DATA_TYPE_WINDOWS` (3), `AUTH_DATA_TYPE_PLUGIN` (4), `AUTH_DATA_TYPE_CREDENTIALS` (5), `AUTH_DATA_TYPE_ANONYMOUS` (6). |
| <a id="f-data"></a>`data` | [`AuthDataClientUnion`](https://developer.m-files.com/APIs/gRPC-API/Reference/Messages/MFiles.AuthDataClientUnion/index.md) | 2 | The method's data. Set exactly the member that `type` names. |
| <a id="f-certificate_proof"></a>`certificate_proof` | `string` | 3 | Leave empty. Used only when the server requires client certificates. |
| <a id="f-is_certificate_validated"></a>`is_certificate_validated` | `bool` | 4 | Leave false. Set only by M-Files proxies that validate client certificates themselves. |

<a id="used-by-methods"></a>

## Used by methods

- [IRPCLogin.LogIn](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/LogIn/index.md): Authenticates the caller and opens a session to a vault, or to the server when the vault GUID is all zeros.
- [IRPCLogin.LogInRemote](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/LogInRemote/index.md): Logs in (with authentication) to a remote server.

<a id="used-in-fields"></a>

## Used in fields

- [`LogInRemoteRequest.authentication_data`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/LogInRemote/index.md#request): Authentication data for the remote server, as in `LogIn`.
- [`LogInRequest.authentication_data`](https://developer.m-files.com/APIs/gRPC-API/Reference/MFiles.IRPCLogin/LogIn/index.md#request): How the caller proves its identity: `type` plus the matching member of `data`.
