| 1 | # openapi.api.AuthenticationApi |
| 2 | |
| 3 | ## Load the API package |
| 4 | ```dart |
| 5 | import 'package:openapi/api.dart'; |
| 6 | ``` |
| 7 | |
| 8 | All URIs are relative to *http://localhost* |
| 9 | |
| 10 | Method | HTTP request | Description |
| 11 | ------------- | ------------- | ------------- |
| 12 | [**authControllerGetCurrentUserV1**]( |
| 13 | [**authControllerLoginV1**]( |
| 14 | [**authControllerRegisterV1**]( |
| 15 | |
| 16 | |
| 17 | # **authControllerGetCurrentUserV1 |
| 18 | > UserEntity authControllerGetCurrentUserV1() |
| 19 | |
| 20 | Get current user |
| 21 | |
| 22 | Get current user |
| 23 | |
| 24 | ### Example |
| 25 | ```dart |
| 26 | import 'package:openapi/api.dart'; |
| 27 | |
| 28 | final api = Openapi(). |
| 29 | |
| 30 | try { |
| 31 | final response = api.authControllerGetCurrentUserV1 |
| 32 | print(response); |
| 33 | } on DioException catch (e) { |
| 34 | print('Exception when calling AuthenticationApi->authControllerGetCurrentUserV1: $e\n |
| 35 | } |
| 36 | ``` |
| 37 | |
| 38 | ### Parameters |
| 39 | This endpoint does not need any parameter. |
| 40 | |
| 41 | ### Return type |
| 42 | |
| 43 | [**UserEntity**]( |
| 44 | |
| 45 | ### Authorization |
| 46 | |
| 47 | [JWT-auth](../README.md#JWT-auth) |
| 48 | |
| 49 | ### HTTP request headers |
| 50 | |
| 51 | - **Content-Type** |
| 52 | - **Accept** |
| 53 | |
| 54 | [[Back to top]](#) |
| 55 | |
| 56 | # **authControllerLoginV1 |
| 57 | > LoginEntity authControllerLoginV1(loginDTO) |
| 58 | |
| 59 | Login |
| 60 | |
| 61 | Login |
| 62 | |
| 63 | ### Example |
| 64 | ```dart |
| 65 | import 'package:openapi/api.dart'; |
| 66 | |
| 67 | final api = Openapi(). |
| 68 | final LoginDTO loginDTO = ; |
| 69 | |
| 70 | try { |
| 71 | final response = api.authControllerLoginV1 |
| 72 | print(response); |
| 73 | } on DioException catch (e) { |
| 74 | print('Exception when calling AuthenticationApi->authControllerLoginV1: $e\n |
| 75 | } |
| 76 | ``` |
| 77 | |
| 78 | ### Parameters |
| 79 | |
| 80 | Name | Type | Description | Notes |
| 81 | ------------- | ------------- | ------------- | ------------- |
| 82 | **loginDTO** | [ |
| 83 | |
| 84 | ### Return type |
| 85 | |
| 86 | [**LoginEntity**]( |
| 87 | |
| 88 | ### Authorization |
| 89 | |
| 90 | No authorization required |
| 91 | |
| 92 | ### HTTP request headers |
| 93 | |
| 94 | - **Content-Type** |
| 95 | - **Accept** |
| 96 | |
| 97 | [[Back to top]](#) |
| 98 | |
| 99 | # **authControllerRegisterV1 |
| 100 | > RegisterEntity authControllerRegisterV1(registerDTO) |
| 101 | |
| 102 | Register |
| 103 | |
| 104 | Create a new user |
| 105 | |
| 106 | ### Example |
| 107 | ```dart |
| 108 | import 'package:openapi/api.dart'; |
| 109 | |
| 110 | final api = Openapi(). |
| 111 | final RegisterDTO registerDTO = ; |
| 112 | |
| 113 | try { |
| 114 | final response = api.authControllerRegisterV1 |
| 115 | print(response); |
| 116 | } on DioException catch (e) { |
| 117 | print('Exception when calling AuthenticationApi->authControllerRegisterV1: $e\n |
| 118 | } |
| 119 | ``` |
| 120 | |
| 121 | ### Parameters |
| 122 | |
| 123 | Name | Type | Description | Notes |
| 124 | ------------- | ------------- | ------------- | ------------- |
| 125 | **registerDTO** | [ |
| 126 | |
| 127 | ### Return type |
| 128 | |
| 129 | [**RegisterEntity**]( |
| 130 | |
| 131 | ### Authorization |
| 132 | |
| 133 | No authorization required |
| 134 | |
| 135 | ### HTTP request headers |
| 136 | |
| 137 | - **Content-Type** |
| 138 | - **Accept** |
| 139 | |
| 140 | [[Back to top]](#) |
| 141 | |