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

torresj / email-register-api / 9

22 Jul 2025 06:27AM UTC coverage: 60.638% (-0.2%) from 60.87%
9

push

circleci

Jaime Torres Benavente
Login endpoint added

1 of 2 new or added lines in 1 file covered. (50.0%)

57 of 94 relevant lines covered (60.64%)

0.61 hits per line

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

50.0
/src/main/java/com/torresj/email_register_api/controllers/LoginController.java
1
package com.torresj.email_register_api.controllers;
2

3
import io.swagger.v3.oas.annotations.Operation;
4
import io.swagger.v3.oas.annotations.responses.ApiResponse;
5
import io.swagger.v3.oas.annotations.responses.ApiResponses;
6
import io.swagger.v3.oas.annotations.security.SecurityRequirement;
7
import lombok.RequiredArgsConstructor;
8
import lombok.extern.slf4j.Slf4j;
9
import org.springframework.http.ResponseEntity;
10
import org.springframework.security.access.prepost.PreAuthorize;
11
import org.springframework.web.bind.annotation.PostMapping;
12
import org.springframework.web.bind.annotation.RequestMapping;
13
import org.springframework.web.bind.annotation.RestController;
14

15
@RestController
16
@RequestMapping("/v1/login")
17
@Slf4j
1✔
18
@RequiredArgsConstructor
19
public class LoginController {
20
    @Operation(summary = "Login", security = @SecurityRequirement(name = "basicScheme"))
21
    @ApiResponses(
22
            value = {
23
                    @ApiResponse(
24
                            responseCode = "200",
25
                            description = "Authorized"
26
                    ),
27
            })
28
    @PostMapping()
29
    @PreAuthorize("hasAnyRole('USER','ADMIN')")
30
    public ResponseEntity<String> login() {
NEW
31
        return ResponseEntity.ok("Authorized");
×
32
    }
33
}
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