fix(kobo): proxy the /v1/auth/device endpoint (#511)
without this it's impossible to set up a kobo device since we won't have a userkey yet
This commit is contained in:
@@ -115,7 +115,11 @@ public class KoboController {
|
|||||||
@Operation(summary = "Authenticate Kobo device", description = "Authenticate a Kobo device.")
|
@Operation(summary = "Authenticate Kobo device", description = "Authenticate a Kobo device.")
|
||||||
@ApiResponse(responseCode = "200", description = "Device authenticated successfully")
|
@ApiResponse(responseCode = "200", description = "Device authenticated successfully")
|
||||||
@PostMapping("/v1/auth/device")
|
@PostMapping("/v1/auth/device")
|
||||||
public ResponseEntity<KoboAuthentication> authenticateDevice(@Parameter(description = "Authentication request body") @RequestBody JsonNode body) {
|
public ResponseEntity<?> authenticateDevice(@Parameter(description = "Authentication request body") @RequestBody JsonNode body) {
|
||||||
|
if (isForwardingToKoboStore()) {
|
||||||
|
return koboServerProxy.proxyCurrentRequest(body, false);
|
||||||
|
}
|
||||||
|
|
||||||
return koboDeviceAuthService.authenticateDevice(body);
|
return koboDeviceAuthService.authenticateDevice(body);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user