Cleanup
This commit is contained in:
parent
9dabfe09d0
commit
69daa3804a
7 changed files with 15 additions and 7 deletions
2
mobile/openapi/doc/AuthenticationApi.md
generated
2
mobile/openapi/doc/AuthenticationApi.md
generated
|
@ -172,6 +172,8 @@ This endpoint does not need any parameter.
|
|||
|
||||
|
||||
|
||||
Get user login details and a bearer token from an API key
|
||||
|
||||
### Example
|
||||
```dart
|
||||
import 'package:openapi/api.dart';
|
||||
|
|
5
mobile/openapi/lib/api/authentication_api.dart
generated
5
mobile/openapi/lib/api/authentication_api.dart
generated
|
@ -154,7 +154,9 @@ class AuthenticationApi {
|
|||
return null;
|
||||
}
|
||||
|
||||
/// Performs an HTTP 'GET /auth/keyLogin' operation and returns the [Response].
|
||||
/// Get user login details and a bearer token from an API key
|
||||
///
|
||||
/// Note: This method returns the HTTP [Response].
|
||||
Future<Response> keyLoginWithHttpInfo() async {
|
||||
// ignore: prefer_const_declarations
|
||||
final path = r'/auth/keyLogin';
|
||||
|
@ -180,6 +182,7 @@ class AuthenticationApi {
|
|||
);
|
||||
}
|
||||
|
||||
/// Get user login details and a bearer token from an API key
|
||||
Future<LoginResponseDto?> keyLogin() async {
|
||||
final response = await keyLoginWithHttpInfo();
|
||||
if (response.statusCode >= HttpStatus.badRequest) {
|
||||
|
|
2
mobile/openapi/test/authentication_api_test.dart
generated
2
mobile/openapi/test/authentication_api_test.dart
generated
|
@ -32,6 +32,8 @@ void main() {
|
|||
// TODO
|
||||
});
|
||||
|
||||
// Get user login details and a bearer token from an API key
|
||||
//
|
||||
//Future<LoginResponseDto> keyLogin() async
|
||||
test('test keyLogin', () async {
|
||||
// TODO
|
||||
|
|
|
@ -2077,6 +2077,7 @@
|
|||
"/auth/keyLogin": {
|
||||
"get": {
|
||||
"operationId": "keyLogin",
|
||||
"description": "Get user login details and a bearer token from an API key",
|
||||
"parameters": [],
|
||||
"responses": {
|
||||
"200": {
|
||||
|
|
|
@ -86,7 +86,7 @@ export class AuthService {
|
|||
authUser: AuthUserDto,
|
||||
loginDetails: LoginDetails,
|
||||
): Promise<{ response: LoginResponseDto; cookie: string[] }> {
|
||||
let user = await this.userCore.get(authUser.id, false);
|
||||
const user = await this.userCore.get(authUser.id, false);
|
||||
|
||||
if (!user) {
|
||||
this.logger.warn(`Failed key login attempt for user ${authUser.email} from ip address ${loginDetails.clientIp}`);
|
||||
|
|
|
@ -50,7 +50,7 @@ export class AuthController {
|
|||
@AuthUser() authUser: AuthUserDto,
|
||||
@GetLoginDetails() loginDetails: LoginDetails,
|
||||
): Promise<LoginResponseDto> {
|
||||
const { response, cookie } = await this.service.keyLogin(authUser, loginDetails);
|
||||
const { response } = await this.service.keyLogin(authUser, loginDetails);
|
||||
return response;
|
||||
}
|
||||
|
||||
|
|
8
web/src/api/open-api/api.ts
generated
8
web/src/api/open-api/api.ts
generated
|
@ -7104,7 +7104,7 @@ export const AuthenticationApiAxiosParamCreator = function (configuration?: Conf
|
|||
};
|
||||
},
|
||||
/**
|
||||
*
|
||||
* Get user login details and a bearer token from an API key
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
|
@ -7372,7 +7372,7 @@ export const AuthenticationApiFp = function(configuration?: Configuration) {
|
|||
return createRequestFunction(localVarAxiosArgs, globalAxios, BASE_PATH, configuration);
|
||||
},
|
||||
/**
|
||||
*
|
||||
* Get user login details and a bearer token from an API key
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
|
@ -7464,7 +7464,7 @@ export const AuthenticationApiFactory = function (configuration?: Configuration,
|
|||
return localVarFp.getAuthDevices(options).then((request) => request(axios, basePath));
|
||||
},
|
||||
/**
|
||||
*
|
||||
* Get user login details and a bearer token from an API key
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
*/
|
||||
|
@ -7612,7 +7612,7 @@ export class AuthenticationApi extends BaseAPI {
|
|||
}
|
||||
|
||||
/**
|
||||
*
|
||||
* Get user login details and a bearer token from an API key
|
||||
* @param {*} [options] Override http request option.
|
||||
* @throws {RequiredError}
|
||||
* @memberof AuthenticationApi
|
||||
|
|
Loading…
Reference in a new issue