• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

torresj / infosas-api / 87

12 Jan 2026 02:35PM UTC coverage: 76.32% (-15.3%) from 91.648%
87

push

circleci

torresj
Auth API added

70 of 170 new or added lines in 20 files covered. (41.18%)

477 of 625 relevant lines covered (76.32%)

0.76 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

20.0
/src/main/java/com/torresj/infosas/controllers/AuthController.java
1
package com.torresj.infosas.controllers;
2

3
import com.torresj.infosas.dtos.AuthDto;
4
import com.torresj.infosas.dtos.AuthResponseDto;
5
import com.torresj.infosas.services.AuthService;
6
import io.swagger.v3.oas.annotations.Operation;
7
import io.swagger.v3.oas.annotations.media.ArraySchema;
8
import io.swagger.v3.oas.annotations.media.Content;
9
import io.swagger.v3.oas.annotations.media.Schema;
10
import io.swagger.v3.oas.annotations.responses.ApiResponse;
11
import io.swagger.v3.oas.annotations.responses.ApiResponses;
12
import lombok.RequiredArgsConstructor;
13
import lombok.extern.slf4j.Slf4j;
14
import org.springframework.http.ResponseEntity;
15
import org.springframework.web.bind.annotation.*;
16

17
@RestController
18
@RequestMapping("/v1/auth")
19
@Slf4j
1✔
20
@RequiredArgsConstructor
21
public class AuthController {
22

23
    private final AuthService authService;
24

25
    @Operation(summary = "Infosas Login")
26
    @ApiResponses(
27
            value = {
28
                    @ApiResponse(
29
                            responseCode = "200",
30
                            description = "Success",
31
                            content = {
32
                                    @Content(
33
                                            mediaType = "application/json",
34
                                            array = @ArraySchema(schema = @Schema(implementation = AuthResponseDto.class)))
35
                            }),
36
            })
37
    @PostMapping()
38
    public ResponseEntity<AuthResponseDto> getMetrics(
39
            @io.swagger.v3.oas.annotations.parameters.RequestBody(
40
                    description = "Login DTO with client and password",
41
                    required = true,
42
                    content = @Content(schema = @Schema(implementation = AuthDto.class)))
43
            @RequestBody AuthDto authDto
44
    ){
NEW
45
        log.info("INFOSAS Login attempt with client {}", authDto.id());
×
NEW
46
        var response = authService.authenticate(authDto.id(), authDto.password());
×
NEW
47
        log.info("INFOSAS Login success");
×
NEW
48
        return ResponseEntity.ok(response);
×
49
    }
50
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc