This commit is contained in:
Jonathan Jogenfors 2023-06-21 16:04:19 +02:00
parent 9dabfe09d0
commit 69daa3804a
7 changed files with 15 additions and 7 deletions

View file

@ -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';

View file

@ -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) {

View file

@ -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

View file

@ -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": {

View file

@ -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}`);

View file

@ -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;
}

View file

@ -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