basePath: /v1 definitions: core.forgotten: properties: userkey: type: string required: - userkey type: object core.login: properties: password: type: string twofactorcode: type: string userkey: type: string required: - password - userkey type: object core.reset: properties: password: type: string token: type: string required: - password - token type: object core.signup: properties: password: type: string userkey: type: string required: - password - userkey type: object info: contact: {} title: Go-Gin Prepack version: "1" paths: /adm/doot: get: parameters: - description: JWT Cookie set by /admin in: header name: jwt required: true type: string responses: "200": description: "" summary: Admin ping /admin: post: consumes: - application/json description: Secured login for any user accounts parameters: - description: email, password and 2FA code. 2FA code is required in: body name: login required: true schema: $ref: '#/definitions/core.login' produces: - application/json responses: "200": description: "" headers: jwt: description: The authentication token for this session, valid for 24h type: string "400": description: userkey, 2fa token or password missing "401": description: not found or credentials invalid summary: Admin login /doot: get: responses: "200": description: "" summary: Unauthenticated Ping /forgot: post: consumes: - application/json description: Request a password reset for the provided userkey parameters: - description: email to reset in: body name: userkey required: true schema: $ref: '#/definitions/core.forgotten' produces: - application/json responses: "200": description: "" "400": description: userkey not provided summary: Forgot password /login: post: consumes: - application/json description: Secured login for any user accounts parameters: - description: Login information in: body name: login required: true schema: $ref: '#/definitions/core.login' produces: - application/json responses: "200": description: "" headers: jwt: description: The authentication token for this session, valid for 24h type: string "400": description: userkey or password missing "401": description: not found or credentials invalid summary: User login /reset: post: consumes: - application/json description: Use a JWT token to validate and reset a password parameters: - description: the reset token and the password in: body name: reset required: true schema: $ref: '#/definitions/core.reset' produces: - application/json responses: "200": description: "" "400": description: token and password not provided "401": description: bad token or user not found summary: Password reset /sec/2fa-doot: get: parameters: - description: 2FA authentication code in: query name: twofactorcode required: true type: string responses: "200": description: "" summary: 2FA-Restricted Ping /sec/doot: get: parameters: - description: JWT Cookie set by /login in: header name: jwt required: true type: string responses: "200": description: "" summary: User ping /signup: post: consumes: - application/json description: Sign a user up for a new account parameters: - description: The signup information in: body name: signup required: true schema: $ref: '#/definitions/core.signup' produces: - application/json responses: "200": description: "" "400": description: userkey missing, or password missing or not strong enough summary: User signup /verify: post: consumes: - application/json description: Email verification based on a token sent to a registered email parameters: - description: Verification JWT in: query name: verify required: true type: string produces: - application/json responses: "200": description: "" "401": description: bad token summary: User verify swagger: "2.0"