Skip to content

API Reference

getCsrfToken

Fetches the CSRF token required for login.

### Parameters
| Name | Type | Description |
|------|------|-------------|
| `target` | `string` | The target for the Varvis API. |

### Returns
**Type:** `Promise.<string>`

- The CSRF token.

login

Logs in to the Varvis API and retrieves the CSRF token.

### Parameters
| Name | Type | Description |
|------|------|-------------|
| `user` | `object` | The user credentials. |
| `user.username` | `string` | The username. |
| `user.password` | `string` | The password. |
| `target` | `string` | The target for the Varvis API. |

### Returns
**Type:** `Promise.<object>`

- The login response containing the CSRF token.

Class: AuthService

AuthService class handles authentication with the Varvis API.

Released under the GPL-3.0 License.