# AuthApi

All URIs are relative to *http://localhost:8080/api/v1*

|Method | HTTP request | Description|
|------------- | ------------- | -------------|
|[**auth2faDisablePost**](#auth2fadisablepost) | **POST** /auth/2fa/disable | Disable 2FA|
|[**auth2faSetupPost**](#auth2fasetuppost) | **POST** /auth/2fa/setup | Setup 2FA|
|[**auth2faStatusGet**](#auth2fastatusget) | **GET** /auth/2fa/status | Get 2FA Status|
|[**auth2faVerifyPost**](#auth2faverifypost) | **POST** /auth/2fa/verify | Verify and Enable 2FA|
|[**authCheckUsernameGet**](#authcheckusernameget) | **GET** /auth/check-username | Check Username Availability|
|[**authLoginPost**](#authloginpost) | **POST** /auth/login | User Login|
|[**authLogoutPost**](#authlogoutpost) | **POST** /auth/logout | Logout|
|[**authMeGet**](#authmeget) | **GET** /auth/me | Get Current User|
|[**authRefreshPost**](#authrefreshpost) | **POST** /auth/refresh | Refresh Token|
|[**authRegisterPost**](#authregisterpost) | **POST** /auth/register | User Registration|
|[**authResendVerificationPost**](#authresendverificationpost) | **POST** /auth/resend-verification | Resend Verification Email|
|[**authVerifyEmailPost**](#authverifyemailpost) | **POST** /auth/verify-email | Verify Email|

# **auth2faDisablePost**
> AnalyticsEventsPost200Response auth2faDisablePost(request)

Disable 2FA for user (requires password confirmation)

### Example

```typescript
import {
    AuthApi,
    Configuration,
    InternalHandlersDisableTwoFactorRequest
} from './api';

const configuration = new Configuration();
const apiInstance = new AuthApi(configuration);

let request: InternalHandlersDisableTwoFactorRequest; //Password Confirmation

const { status, data } = await apiInstance.auth2faDisablePost(
    request
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **request** | **InternalHandlersDisableTwoFactorRequest**| Password Confirmation | |


### Return type

**AnalyticsEventsPost200Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**400** | Invalid password or 2FA not enabled |  -  |
|**401** | Unauthorized |  -  |
|**500** | Internal Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **auth2faSetupPost**
> Auth2faSetupPost200Response auth2faSetupPost()

Generate 2FA secret and QR code for setup

### Example

```typescript
import {
    AuthApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new AuthApi(configuration);

const { status, data } = await apiInstance.auth2faSetupPost();
```

### Parameters
This endpoint does not have any parameters.


### Return type

**Auth2faSetupPost200Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**400** | 2FA already enabled |  -  |
|**401** | Unauthorized |  -  |
|**500** | Internal Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **auth2faStatusGet**
> Auth2faStatusGet200Response auth2faStatusGet()

Get 2FA enabled status for authenticated user

### Example

```typescript
import {
    AuthApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new AuthApi(configuration);

const { status, data } = await apiInstance.auth2faStatusGet();
```

### Parameters
This endpoint does not have any parameters.


### Return type

**Auth2faStatusGet200Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**401** | Unauthorized |  -  |
|**500** | Internal Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **auth2faVerifyPost**
> AnalyticsEventsPost200Response auth2faVerifyPost(request)

Verify 2FA code and enable 2FA for user

### Example

```typescript
import {
    AuthApi,
    Configuration,
    InternalHandlersVerifyTwoFactorRequest
} from './api';

const configuration = new Configuration();
const apiInstance = new AuthApi(configuration);

let request: InternalHandlersVerifyTwoFactorRequest; //2FA Code

const { status, data } = await apiInstance.auth2faVerifyPost(
    request
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **request** | **InternalHandlersVerifyTwoFactorRequest**| 2FA Code | |


### Return type

**AnalyticsEventsPost200Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**400** | Invalid code |  -  |
|**401** | Unauthorized |  -  |
|**500** | Internal Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **authCheckUsernameGet**
> AuthCheckUsernameGet200Response authCheckUsernameGet()

Check if a username is already taken

### Example

```typescript
import {
    AuthApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new AuthApi(configuration);

let username: string; //Username to check (default to undefined)

const { status, data } = await apiInstance.authCheckUsernameGet(
    username
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **username** | [**string**] | Username to check | defaults to undefined|


### Return type

**AuthCheckUsernameGet200Response**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**400** | Missing Username |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **authLoginPost**
> VezaBackendApiInternalDtoLoginResponse authLoginPost(request)

Authenticate user and return access token. Refresh token is set in httpOnly cookie.

### Example

```typescript
import {
    AuthApi,
    Configuration,
    VezaBackendApiInternalDtoLoginRequest
} from './api';

const configuration = new Configuration();
const apiInstance = new AuthApi(configuration);

let request: VezaBackendApiInternalDtoLoginRequest; //Login Credentials

const { status, data } = await apiInstance.authLoginPost(
    request
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **request** | **VezaBackendApiInternalDtoLoginRequest**| Login Credentials | |


### Return type

**VezaBackendApiInternalDtoLoginResponse**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Access token returned in body, refresh token in httpOnly cookie |  -  |
|**400** | Validation or Bad Request |  -  |
|**401** | Invalid credentials |  -  |
|**500** | Internal Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **authLogoutPost**
> InternalHandlersAPIResponse authLogoutPost(request)

Revoke refresh token and current session

### Example

```typescript
import {
    AuthApi,
    Configuration,
    AuthLogoutPostRequest
} from './api';

const configuration = new Configuration();
const apiInstance = new AuthApi(configuration);

let request: AuthLogoutPostRequest; //Refresh Token to revoke

const { status, data } = await apiInstance.authLogoutPost(
    request
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **request** | **AuthLogoutPostRequest**| Refresh Token to revoke | |


### Return type

**InternalHandlersAPIResponse**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Success message |  -  |
|**400** | Validation Error |  -  |
|**401** | Unauthorized |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **authMeGet**
> AuthMeGet200Response authMeGet()

Get profile information of the currently logged-in user

### Example

```typescript
import {
    AuthApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new AuthApi(configuration);

const { status, data } = await apiInstance.authMeGet();
```

### Parameters
This endpoint does not have any parameters.


### Return type

**AuthMeGet200Response**

### Authorization

[BearerAuth](../README.md#BearerAuth)

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**401** | Unauthorized |  -  |
|**404** | User not found |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **authRefreshPost**
> VezaBackendApiInternalDtoTokenResponse authRefreshPost(request)

Get a new access token using a refresh token

### Example

```typescript
import {
    AuthApi,
    Configuration,
    VezaBackendApiInternalDtoRefreshRequest
} from './api';

const configuration = new Configuration();
const apiInstance = new AuthApi(configuration);

let request: VezaBackendApiInternalDtoRefreshRequest; //Refresh Token

const { status, data } = await apiInstance.authRefreshPost(
    request
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **request** | **VezaBackendApiInternalDtoRefreshRequest**| Refresh Token | |


### Return type

**VezaBackendApiInternalDtoTokenResponse**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | OK |  -  |
|**400** | Validation Error |  -  |
|**401** | Invalid/Expired Refresh Token |  -  |
|**500** | Internal Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **authRegisterPost**
> VezaBackendApiInternalDtoRegisterResponse authRegisterPost(request)

Register a new user account

### Example

```typescript
import {
    AuthApi,
    Configuration,
    VezaBackendApiInternalDtoRegisterRequest
} from './api';

const configuration = new Configuration();
const apiInstance = new AuthApi(configuration);

let request: VezaBackendApiInternalDtoRegisterRequest; //Registration Data

const { status, data } = await apiInstance.authRegisterPost(
    request
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **request** | **VezaBackendApiInternalDtoRegisterRequest**| Registration Data | |


### Return type

**VezaBackendApiInternalDtoRegisterResponse**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**201** | Created |  -  |
|**400** | Validation Error |  -  |
|**409** | User already exists |  -  |
|**500** | Internal Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **authResendVerificationPost**
> InternalHandlersAPIResponse authResendVerificationPost(request)

Resend the email verification link

### Example

```typescript
import {
    AuthApi,
    Configuration,
    VezaBackendApiInternalDtoResendVerificationRequest
} from './api';

const configuration = new Configuration();
const apiInstance = new AuthApi(configuration);

let request: VezaBackendApiInternalDtoResendVerificationRequest; //Email

const { status, data } = await apiInstance.authResendVerificationPost(
    request
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **request** | **VezaBackendApiInternalDtoResendVerificationRequest**| Email | |


### Return type

**InternalHandlersAPIResponse**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: application/json
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Success message |  -  |
|**400** | Validation Error |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

# **authVerifyEmailPost**
> InternalHandlersAPIResponse authVerifyEmailPost()

Verify user email address using a token

### Example

```typescript
import {
    AuthApi,
    Configuration
} from './api';

const configuration = new Configuration();
const apiInstance = new AuthApi(configuration);

let token: string; //Verification Token (default to undefined)

const { status, data } = await apiInstance.authVerifyEmailPost(
    token
);
```

### Parameters

|Name | Type | Description  | Notes|
|------------- | ------------- | ------------- | -------------|
| **token** | [**string**] | Verification Token | defaults to undefined|


### Return type

**InternalHandlersAPIResponse**

### Authorization

No authorization required

### HTTP request headers

 - **Content-Type**: Not defined
 - **Accept**: application/json


### HTTP response details
| Status code | Description | Response headers |
|-------------|-------------|------------------|
|**200** | Success message |  -  |
|**400** | Invalid Token |  -  |

[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)

