yeg
2026-09-28 85bfb9351803d97a33329d507f30a2f78bf1fc75
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
package com.talentcard.server.business.auth;
 
import java.util.Map;
 
import com.talentcard.server.common.ApiResponse;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
 
/** Local payment-link debugging only. The controller is absent unless explicitly enabled. */
@RestController
@RequestMapping("/api/app/auth")
@ConditionalOnProperty(prefix = "app.development-session", name = "enabled", havingValue = "true")
public class DevelopmentSessionController {
 
    private final TalentAuthService talentAuthService;
    private final DevelopmentSessionProperties properties;
 
    public DevelopmentSessionController(TalentAuthService talentAuthService, DevelopmentSessionProperties properties) {
        this.talentAuthService = talentAuthService;
        this.properties = properties;
    }
 
    @PostMapping("/development-session")
    public ApiResponse<Map<String, Object>> create() {
        return ApiResponse.success(talentAuthService.createDevelopmentSession(properties.getTalentId()));
    }
}