diff --git a/doc/api_data.js b/doc/api_data.js index b502c45ed..3591eab6f 100644 --- a/doc/api_data.js +++ b/doc/api_data.js @@ -384,12 +384,13 @@ define({ "api": [ }, "success": { "fields": { - "Success 204": [ + "Success 200": [ { - "group": "Success 204", + "group": "Success 200", + "type": "String", "optional": false, - "field": "status", - "description": "
Identity validation has been initiated.
" + "field": "content", + "description": "The content of the page.
" } ] } @@ -404,14 +405,6 @@ define({ "api": [ "description": "Access is denied.
" } ], - "Error 400": [ - { - "group": "Error 400", - "optional": false, - "field": "InvalidIdentity", - "description": "User identity is invalid.
" - } - ], "Error 500": [ { "group": "Error 500", @@ -462,12 +455,13 @@ define({ "api": [ }, "success": { "fields": { - "Success 204": [ + "Success 200": [ { - "group": "Success 204", + "group": "Success 200", + "type": "String", "optional": false, - "field": "status", - "description": "Identity validation has been initiated.
" + "field": "content", + "description": "The content of the page.
" } ] } @@ -482,14 +476,6 @@ define({ "api": [ "description": "Access is denied.
" } ], - "Error 400": [ - { - "group": "Error 400", - "optional": false, - "field": "InvalidIdentity", - "description": "User identity is invalid.
" - } - ], "Error 500": [ { "group": "Error 500", @@ -657,13 +643,12 @@ define({ "api": [ }, "success": { "fields": { - "Success 200": [ + "Success 204": [ { - "group": "Success 200", - "type": "String", + "group": "Success 204", "optional": false, - "field": "content", - "description": "The content of the page.
" + "field": "status", + "description": "Identity validation has been initiated.
" } ] } @@ -678,6 +663,14 @@ define({ "api": [ "description": "Access is denied.
" } ], + "Error 400": [ + { + "group": "Error 400", + "optional": false, + "field": "InvalidIdentity", + "description": "User identity is invalid.
" + } + ], "Error 500": [ { "group": "Error 500", @@ -715,13 +708,12 @@ define({ "api": [ }, "success": { "fields": { - "Success 200": [ + "Success 204": [ { - "group": "Success 200", - "type": "String", + "group": "Success 204", "optional": false, - "field": "content", - "description": "The content of the page.
" + "field": "status", + "description": "Identity validation has been initiated.
" } ] } @@ -736,6 +728,14 @@ define({ "api": [ "description": "Access is denied.
" } ], + "Error 400": [ + { + "group": "Error 400", + "optional": false, + "field": "InvalidIdentity", + "description": "User identity is invalid.
" + } + ], "Error 500": [ { "group": "Error 500", @@ -773,13 +773,12 @@ define({ "api": [ }, "success": { "fields": { - "Success 200": [ + "Success 204": [ { - "group": "Success 200", - "type": "String", + "group": "Success 204", "optional": false, - "field": "content", - "description": "The content of the page.
" + "field": "status", + "description": "Identity validation has been initiated.
" } ] } @@ -794,6 +793,14 @@ define({ "api": [ "description": "Access is denied.
" } ], + "Error 400": [ + { + "group": "Error 400", + "optional": false, + "field": "InvalidIdentity", + "description": "User identity is invalid.
" + } + ], "Error 500": [ { "group": "Error 500", @@ -845,12 +852,13 @@ define({ "api": [ }, "success": { "fields": { - "Success 204": [ + "Success 200": [ { - "group": "Success 204", + "group": "Success 200", + "type": "String", "optional": false, - "field": "status", - "description": "Identity validation has been initiated.
" + "field": "content", + "description": "The content of the page.
" } ] } @@ -865,14 +873,6 @@ define({ "api": [ "description": "Access is denied.
" } ], - "Error 400": [ - { - "group": "Error 400", - "optional": false, - "field": "InvalidIdentity", - "description": "User identity is invalid.
" - } - ], "Error 500": [ { "group": "Error 500", diff --git a/doc/api_data.json b/doc/api_data.json index 1e93f2cf7..60247d1f4 100644 --- a/doc/api_data.json +++ b/doc/api_data.json @@ -384,12 +384,13 @@ }, "success": { "fields": { - "Success 204": [ + "Success 200": [ { - "group": "Success 204", + "group": "Success 200", + "type": "String", "optional": false, - "field": "status", - "description": "Identity validation has been initiated.
" + "field": "content", + "description": "The content of the page.
" } ] } @@ -404,14 +405,6 @@ "description": "Access is denied.
" } ], - "Error 400": [ - { - "group": "Error 400", - "optional": false, - "field": "InvalidIdentity", - "description": "User identity is invalid.
" - } - ], "Error 500": [ { "group": "Error 500", @@ -462,12 +455,13 @@ }, "success": { "fields": { - "Success 204": [ + "Success 200": [ { - "group": "Success 204", + "group": "Success 200", + "type": "String", "optional": false, - "field": "status", - "description": "Identity validation has been initiated.
" + "field": "content", + "description": "The content of the page.
" } ] } @@ -482,14 +476,6 @@ "description": "Access is denied.
" } ], - "Error 400": [ - { - "group": "Error 400", - "optional": false, - "field": "InvalidIdentity", - "description": "User identity is invalid.
" - } - ], "Error 500": [ { "group": "Error 500", @@ -657,13 +643,12 @@ }, "success": { "fields": { - "Success 200": [ + "Success 204": [ { - "group": "Success 200", - "type": "String", + "group": "Success 204", "optional": false, - "field": "content", - "description": "The content of the page.
" + "field": "status", + "description": "Identity validation has been initiated.
" } ] } @@ -678,6 +663,14 @@ "description": "Access is denied.
" } ], + "Error 400": [ + { + "group": "Error 400", + "optional": false, + "field": "InvalidIdentity", + "description": "User identity is invalid.
" + } + ], "Error 500": [ { "group": "Error 500", @@ -715,13 +708,12 @@ }, "success": { "fields": { - "Success 200": [ + "Success 204": [ { - "group": "Success 200", - "type": "String", + "group": "Success 204", "optional": false, - "field": "content", - "description": "The content of the page.
" + "field": "status", + "description": "Identity validation has been initiated.
" } ] } @@ -736,6 +728,14 @@ "description": "Access is denied.
" } ], + "Error 400": [ + { + "group": "Error 400", + "optional": false, + "field": "InvalidIdentity", + "description": "User identity is invalid.
" + } + ], "Error 500": [ { "group": "Error 500", @@ -773,13 +773,12 @@ }, "success": { "fields": { - "Success 200": [ + "Success 204": [ { - "group": "Success 200", - "type": "String", + "group": "Success 204", "optional": false, - "field": "content", - "description": "The content of the page.
" + "field": "status", + "description": "Identity validation has been initiated.
" } ] } @@ -794,6 +793,14 @@ "description": "Access is denied.
" } ], + "Error 400": [ + { + "group": "Error 400", + "optional": false, + "field": "InvalidIdentity", + "description": "User identity is invalid.
" + } + ], "Error 500": [ { "group": "Error 500", @@ -845,12 +852,13 @@ }, "success": { "fields": { - "Success 204": [ + "Success 200": [ { - "group": "Success 204", + "group": "Success 200", + "type": "String", "optional": false, - "field": "status", - "description": "Identity validation has been initiated.
" + "field": "content", + "description": "The content of the page.
" } ] } @@ -865,14 +873,6 @@ "description": "Access is denied.
" } ], - "Error 400": [ - { - "group": "Error 400", - "optional": false, - "field": "InvalidIdentity", - "description": "User identity is invalid.
" - } - ], "Error 500": [ { "group": "Error 500", diff --git a/doc/api_project.js b/doc/api_project.js index c9d88c053..e51a09d65 100644 --- a/doc/api_project.js +++ b/doc/api_project.js @@ -8,7 +8,7 @@ define({ "apidoc": "0.3.0", "generator": { "name": "apidoc", - "time": "2017-01-29T00:33:20.669Z", + "time": "2017-01-29T00:44:17.687Z", "url": "http://apidocjs.com", "version": "0.17.5" } diff --git a/doc/api_project.json b/doc/api_project.json index 545dc264f..8962ef15d 100644 --- a/doc/api_project.json +++ b/doc/api_project.json @@ -8,7 +8,7 @@ "apidoc": "0.3.0", "generator": { "name": "apidoc", - "time": "2017-01-29T00:33:20.669Z", + "time": "2017-01-29T00:44:17.687Z", "url": "http://apidocjs.com", "version": "0.17.5" } diff --git a/src/lib/setup_endpoints.js b/src/lib/setup_endpoints.js index c405ce14a..8eb507638 100644 --- a/src/lib/setup_endpoints.js +++ b/src/lib/setup_endpoints.js @@ -19,10 +19,11 @@ function setup_endpoints(app) { */ /** - * @apiDefine IdentityValidationDesc + * @apiDefine IdentityValidationPost * - * @apiSuccess (Success 200) {String} content The content of the page. + * @apiSuccess (Success 204) status Identity validation has been initiated. * @apiError (Error 403) AccessDenied Access is denied. + * @apiError (Error 400) InvalidIdentity User identity is invalid. * @apiError (Error 500) {String} error Internal error message. * * @apiDescription This request issue an identity validation token for the user @@ -32,11 +33,10 @@ function setup_endpoints(app) { */ /** - * @apiDefine IdentityValidationParam + * @apiDefine IdentityValidationGet * @apiParam {String} identity_token The one-time identity validation token provided in the email. - * @apiSuccess (Success 204) status Identity validation has been initiated. + * @apiSuccess (Success 200) {String} content The content of the page. * @apiError (Error 403) AccessDenied Access is denied. - * @apiError (Error 400) InvalidIdentity User identity is invalid. * @apiError (Error 500) {String} error Internal error message. */ @@ -73,7 +73,7 @@ function setup_endpoints(app) { * @apiGroup Registration * @apiVersion 1.0.0 * @apiUse UserSession - * @apiUse IdentityValidationDesc + * @apiUse IdentityValidationPost */ /** * @api {get} /authentication/totp-register Serve TOTP registration page @@ -81,7 +81,7 @@ function setup_endpoints(app) { * @apiGroup Registration * @apiVersion 1.0.0 * @apiUse UserSession - * @apiUse IdentityValidationParam + * @apiUse IdentityValidationGet * * * @apiDescription Serves the TOTP registration page that displays the secret. @@ -96,7 +96,7 @@ function setup_endpoints(app) { * @apiGroup Registration * @apiVersion 1.0.0 * @apiUse UserSession - * @apiUse IdentityValidationDesc + * @apiUse IdentityValidationPost */ /** * @api {get} /authentication/u2f-register Serve U2F registration page @@ -104,7 +104,7 @@ function setup_endpoints(app) { * @apiGroup Pages * @apiVersion 1.0.0 * @apiUse UserSession - * @apiUse IdentityValidationParam + * @apiUse IdentityValidationGet * * @apiDescription Serves the U2F registration page that asks the user to * touch the token of the U2F device. @@ -117,7 +117,7 @@ function setup_endpoints(app) { * @apiGroup Registration * @apiVersion 1.0.0 * @apiUse UserSession - * @apiUse IdentityValidationDesc + * @apiUse IdentityValidationPost */ /** * @api {get} /authentication/reset-password Serve password reset form. @@ -125,7 +125,7 @@ function setup_endpoints(app) { * @apiGroup Pages * @apiVersion 1.0.0 * @apiUse UserSession - * @apiUse IdentityValidationParam + * @apiUse IdentityValidationGet * * @apiDescription Serves password reset form that allow the user to provide * the new password.