diff --git a/db-server/index.js b/db-server/index.js index 50ba209..ef709b7 100644 --- a/db-server/index.js +++ b/db-server/index.js @@ -126,7 +126,7 @@ function createServer(db) { api.get('/keyFetchToken/:id/verified', withIdAndBody(db.keyFetchTokenWithVerificationStatus)) api.post('/tokens/:id/verify', withIdAndBody(db.verifyTokens)) - api.post('/tokens/:id/verifyWith', withIdAndBody(db.verifyTokensWithMethod)) + api.post('/tokens/:id/verifyWithMethod', withIdAndBody(db.verifyTokensWithMethod)) api.post('/tokens/:code/verifyCode', withParamsAndBody(db.verifyTokenCode)) api.get('/accountResetToken/:id', withIdAndBody(db.accountResetToken)) diff --git a/db-server/test/backend/remote.js b/db-server/test/backend/remote.js index 31f513c..25e57f1 100644 --- a/db-server/test/backend/remote.js +++ b/db-server/test/backend/remote.js @@ -1605,7 +1605,7 @@ module.exports = function(cfg, makeServer) { const verifyOptions = { verificationMethod: 'totp-2fa', } - return client.postThen('/tokens/' + user.sessionTokenId + '/verifyWith', verifyOptions) + return client.postThen('/tokens/' + user.sessionTokenId + '/verifyWithMethod', verifyOptions) .then((res) => { respOkEmpty(res) return client.getThen('/sessionToken/' + user.sessionTokenId + '/device') diff --git a/docs/API.md b/docs/API.md index c7346d9..86620cb 100644 --- a/docs/API.md +++ b/docs/API.md @@ -91,7 +91,7 @@ The following datatypes are used throughout this document: * forgotPasswordVerified : `POST /passwordForgotToken/:id/verified` * Unverified tokens: * verifyTokens : `POST /tokens/:tokenVerificationId/verify` - * verifyTokensWithMethod : `POST /tokens/:tokenId/verifyWith` + * verifyTokensWithMethod : `POST /tokens/:tokenId/verifyWithMethod` * Sign-in codes * createSigninCode : `PUT /signinCodes/:code` * consumeSigninCode : `POST /signinCodes/:code/consume` @@ -1745,7 +1745,7 @@ Content-Length: 2 * Body : {"code":"InternalError","message":"......"} ``` -## verifyTokens : `POST /tokens//verifyWith` +## verifyTokens : `POST /tokens//verifyWithMethod` This method verifies sessionTokens, keyFetchTokens and sets the the verification method used on the sessions table. @@ -1758,13 +1758,13 @@ curl \ -X POST \ -H "Content-Type: application/json" \ -d '{"verificatioMethod":"totp-2fa"}' \ - http://localhost:8000/tokens/8e8c27b704dbf6a5dc556453c92e7506/verifyWith + http://localhost:8000/tokens/8e8c27b704dbf6a5dc556453c92e7506/verifyWithMethod ``` ### Request * Method : POST -* Path : `/tokens//verifyWith` +* Path : `/tokens//verifyWithMethod` * tokenVerificationId : hex128 * Params: * uid : hex128