mirror of
https://github.com/kmc7468/arkvault.git
synced 2025-12-16 06:58:46 +00:00
/api/key 경로에 있는 Endpoint들을 /api/client 경로로 이동
This commit is contained in:
@@ -26,7 +26,7 @@ const generateChallenge = async (userId: number, ip: string, clientId: number, p
|
||||
return challenge.toString("base64");
|
||||
};
|
||||
|
||||
export const registerPubKey = async (userId: number, ip: string, pubKey: string) => {
|
||||
export const registerUserClient = async (userId: number, ip: string, pubKey: string) => {
|
||||
const client = await getClientByPubKey(pubKey);
|
||||
let clientId;
|
||||
|
||||
@@ -54,7 +54,7 @@ export const registerPubKey = async (userId: number, ip: string, pubKey: string)
|
||||
return await generateChallenge(userId, ip, clientId, pubKey);
|
||||
};
|
||||
|
||||
export const verifyPubKey = async (userId: number, ip: string, answer: string) => {
|
||||
export const verifyUserClient = async (userId: number, ip: string, answer: string) => {
|
||||
const challenge = await getUserClientChallenge(answer, ip);
|
||||
if (!challenge) {
|
||||
error(401, "Invalid challenge answer");
|
||||
Reference in New Issue
Block a user