package com.example.myapp;
import com.unkey.unkeysdk.dto.KeyCreateResponse;
import com.unkey.unkeysdk.dto.KeyCreateRequest;
@RestController
public class APIController {
private static IKeyService keyService = new KeyService();
@PostMapping("/createKey")
public KeyCreateResponse createKey(
@RequestBody KeyCreateRequest keyCreateRequest,
@RequestHeader("Authorization") String authToken) {
// Delegate the creation of the key to the KeyService from the SDK
return keyService.createKey(keyCreateRequest, authToken);
}
}