mirror of https://github.com/nocodb/nocodb
8 changed files with 49 additions and 749 deletions
@ -1,119 +0,0 @@
|
||||
export default `<!DOCTYPE html>
|
||||
<html> |
||||
<head> |
||||
<title>NocoDB - Sign In</title> |
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet"> |
||||
<link href="https://cdn.jsdelivr.net/npm/@mdi/font@5.x/css/materialdesignicons.min.css" rel="stylesheet"> |
||||
<link href="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.css" rel="stylesheet"> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui"> |
||||
|
||||
<script src="https://unpkg.com/vue"></script> |
||||
</head> |
||||
<body> |
||||
<div id="app"> |
||||
<v-app> |
||||
<v-container> |
||||
<v-row class="justify-center"> |
||||
<v-col class="col-12 col-md-6"> |
||||
<v-form ref="form" v-model="validForm" ref="formType" class="ma-auto" |
||||
lazy-validation> |
||||
|
||||
|
||||
<v-text-field |
||||
name="input-10-2" |
||||
label="email" |
||||
type="email" |
||||
v-model="formdata.email" |
||||
:rules="[v => !!v || 'Email is required']" |
||||
></v-text-field> |
||||
|
||||
<v-text-field |
||||
name="input-10-2" |
||||
type="password" |
||||
label="Password" |
||||
v-model="formdata.password" |
||||
:rules="[v => !!v || 'Password is required']" |
||||
></v-text-field> |
||||
|
||||
<v-btn |
||||
:disabled="!validForm" |
||||
large |
||||
@click="signin" |
||||
> |
||||
Sign In |
||||
</v-btn> |
||||
|
||||
</v-form> |
||||
|
||||
<br> |
||||
<pre style="overflow: auto" v-if="success" v-html="success"></pre> |
||||
<v-alert v-else-if="errMsg" type="error"> |
||||
{{errMsg}} |
||||
</v-alert> |
||||
|
||||
|
||||
</v-col> |
||||
</v-row> |
||||
</v-container> |
||||
</v-app> |
||||
</div> |
||||
<script src="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.19.2/axios.min.js"></script> |
||||
|
||||
<script> |
||||
var app = new Vue({ |
||||
el: '#app', |
||||
vuetify: new Vuetify(), |
||||
data: { |
||||
valid: null, |
||||
validForm: false, |
||||
greeting: 'Password Reset', |
||||
formdata: { |
||||
password: '', |
||||
newPassword: '' |
||||
}, |
||||
success: false, |
||||
errMsg: null |
||||
}, |
||||
methods: { |
||||
async signin() { |
||||
if (this.$refs.form.validate()) { |
||||
try { |
||||
const res = await axios.post('<%- baseUrl %>auth/signin', this.formdata); |
||||
this.success = res.data; |
||||
} catch (e) { |
||||
if (e.response && e.response.data && e.response.data.msg) { |
||||
this.errMsg = e.response.data.msg; |
||||
} else { |
||||
this.errMsg = 'Some error occurred'; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
}) |
||||
</script> |
||||
</body> |
||||
</html>`;
|
||||
/** |
||||
* @copyright Copyright (c) 2021, Xgene Cloud Ltd |
||||
* |
||||
* @author Naveen MR <oof1lab@gmail.com> |
||||
* @author Pranav C Balan <pranavxc@gmail.com> |
||||
* |
||||
* @license GNU AGPL version 3 or any later version |
||||
* |
||||
* This program is free software: you can redistribute it and/or modify |
||||
* it under the terms of the GNU Affero General Public License as |
||||
* published by the Free Software Foundation, either version 3 of the |
||||
* License, or (at your option) any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU Affero General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU Affero General Public License |
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
* |
||||
*/ |
@ -1,135 +0,0 @@
|
||||
export default `<!DOCTYPE html>
|
||||
<html> |
||||
<head> |
||||
<title>NocoDB - Sign Up</title> |
||||
<link href="https://fonts.googleapis.com/css?family=Roboto:100,300,400,500,700,900" rel="stylesheet"> |
||||
<link href="https://cdn.jsdelivr.net/npm/@mdi/font@5.x/css/materialdesignicons.min.css" rel="stylesheet"> |
||||
<link href="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.min.css" rel="stylesheet"> |
||||
<meta name="viewport" content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui"> |
||||
|
||||
<script src="https://unpkg.com/vue"></script> |
||||
</head> |
||||
<body> |
||||
<div id="app"> |
||||
<v-app> |
||||
<v-container> |
||||
<v-row class="justify-center"> |
||||
<v-col class="col-12 col-md-6"> |
||||
<v-form ref="form" v-model="validForm" ref="formType" class="ma-auto" |
||||
lazy-validation> |
||||
|
||||
|
||||
<v-text-field |
||||
name="input-10-2" |
||||
label="First Name" |
||||
type="text" |
||||
v-model="formdata.firstname" |
||||
:rules="[v => !!v || 'First Name is required']" |
||||
></v-text-field> |
||||
|
||||
<v-text-field |
||||
name="input-10-2" |
||||
label="Last Name" |
||||
type="text" |
||||
v-model="formdata.lastname" |
||||
:rules="[v => !!v || 'Last Name is required']" |
||||
></v-text-field> |
||||
|
||||
<v-text-field |
||||
name="input-10-2" |
||||
label="email" |
||||
type="email" |
||||
v-model="formdata.email" |
||||
:rules="[v => !!v || 'Email is required']" |
||||
></v-text-field> |
||||
|
||||
<v-text-field |
||||
name="input-10-2" |
||||
type="password" |
||||
label="Password" |
||||
v-model="formdata.password" |
||||
:rules="[v => !!v || 'Password is required']" |
||||
></v-text-field> |
||||
|
||||
<v-btn |
||||
:disabled="!validForm" |
||||
large |
||||
@click="signin" |
||||
> |
||||
Sign Up |
||||
</v-btn> |
||||
|
||||
</v-form> |
||||
|
||||
<br> |
||||
<pre style="overflow: auto" v-if="success" v-html="success"></pre> |
||||
<v-alert v-else-if="errMsg" type="error"> |
||||
{{errMsg}} |
||||
</v-alert> |
||||
|
||||
|
||||
</v-col> |
||||
</v-row> |
||||
</v-container> |
||||
</v-app> |
||||
</div> |
||||
<script src="https://cdn.jsdelivr.net/npm/vuetify@2.x/dist/vuetify.js"></script> |
||||
<script src="https://cdnjs.cloudflare.com/ajax/libs/axios/0.19.2/axios.min.js"></script> |
||||
|
||||
<script> |
||||
var app = new Vue({ |
||||
el: '#app', |
||||
vuetify: new Vuetify(), |
||||
data: { |
||||
valid: null, |
||||
validForm: false, |
||||
greeting: 'Password Reset', |
||||
formdata: { |
||||
password: '', |
||||
newPassword: '' |
||||
}, |
||||
success: false, |
||||
errMsg: null |
||||
}, |
||||
methods: { |
||||
async signin() { |
||||
if (this.$refs.form.validate()) { |
||||
try { |
||||
const res = await axios.post('<%- baseUrl %>auth/signup', this.formdata); |
||||
this.success = res.data; |
||||
} catch (e) { |
||||
if (e.response && e.response.data && e.response.data.msg) { |
||||
this.errMsg = e.response.data.msg; |
||||
} else { |
||||
this.errMsg = 'Some error occurred'; |
||||
} |
||||
} |
||||
} |
||||
} |
||||
} |
||||
}) |
||||
</script> |
||||
</body> |
||||
</html>`;
|
||||
/** |
||||
* @copyright Copyright (c) 2021, Xgene Cloud Ltd |
||||
* |
||||
* @author Naveen MR <oof1lab@gmail.com> |
||||
* @author Pranav C Balan <pranavxc@gmail.com> |
||||
* |
||||
* @license GNU AGPL version 3 or any later version |
||||
* |
||||
* This program is free software: you can redistribute it and/or modify |
||||
* it under the terms of the GNU Affero General Public License as |
||||
* published by the Free Software Foundation, either version 3 of the |
||||
* License, or (at your option) any later version. |
||||
* |
||||
* This program is distributed in the hope that it will be useful, |
||||
* but WITHOUT ANY WARRANTY; without even the implied warranty of |
||||
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
||||
* GNU Affero General Public License for more details. |
||||
* |
||||
* You should have received a copy of the GNU Affero General Public License |
||||
* along with this program. If not, see <http://www.gnu.org/licenses/>. |
||||
* |
||||
*/ |
@ -1,425 +0,0 @@
|
||||
{ |
||||
"swagger": "2.0", |
||||
"info": { |
||||
"description": "Create APIs at the speed of your thoughts", |
||||
"version": "1.0.0", |
||||
"title": "NocoDB", |
||||
"contact": {} |
||||
}, |
||||
"host": "localhost:8080", |
||||
"basePath": "/", |
||||
"tags": [ |
||||
{ |
||||
"name": "common" |
||||
} |
||||
], |
||||
"schemes": [ |
||||
"http" |
||||
], |
||||
"paths": { |
||||
"/auth/signin": { |
||||
"post": { |
||||
"security": [ |
||||
], |
||||
"tags": [ |
||||
"Authentication" |
||||
], |
||||
"summary": "User login", |
||||
"description": "", |
||||
"operationId": "login", |
||||
"consumes": [ |
||||
"application/json" |
||||
], |
||||
"produces": [ |
||||
"application/json" |
||||
], |
||||
"parameters": [ |
||||
{ |
||||
"in": "body", |
||||
"name": "body", |
||||
"description": "Authentication user details", |
||||
"required": true, |
||||
"schema": { |
||||
"$ref": "#/definitions/userAuth" |
||||
} |
||||
} |
||||
], |
||||
"responses": { |
||||
"200": { |
||||
"description": "Authenticated successfully", |
||||
"schema": { |
||||
"$ref": "#/definitions/token" |
||||
} |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
"/auth/signup": { |
||||
"post": { |
||||
"tags": [ |
||||
"Authentication" |
||||
], |
||||
"summary": "User signup", |
||||
"description": "", |
||||
"operationId": "signup", |
||||
"consumes": [ |
||||
"application/json" |
||||
], |
||||
"produces": [ |
||||
"application/json" |
||||
], |
||||
"parameters": [ |
||||
{ |
||||
"in": "body", |
||||
"name": "body", |
||||
"description": "Signup user details", |
||||
"required": true, |
||||
"schema": { |
||||
"$ref": "#/definitions/user" |
||||
} |
||||
} |
||||
], |
||||
"responses": { |
||||
"200": { |
||||
"description": "Registration success", |
||||
"schema": { |
||||
"$ref": "#/definitions/token" |
||||
} |
||||
}, |
||||
"400": { |
||||
"description": "Bad request" |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
"/auth/password/forgot": { |
||||
"post": { |
||||
"tags": [ |
||||
"Authentication" |
||||
], |
||||
"summary": "Password Forgot", |
||||
"description": "", |
||||
"operationId": "passwordForgot", |
||||
"consumes": [ |
||||
"application/json" |
||||
], |
||||
"produces": [ |
||||
"application/json" |
||||
], |
||||
"parameters": [ |
||||
{ |
||||
"in": "body", |
||||
"name": "body", |
||||
"description": "Email address", |
||||
"required": true, |
||||
"schema": { |
||||
"type": "object", |
||||
"properties": { |
||||
"email": { |
||||
"type": "string", |
||||
"required": true, |
||||
"example": "test@nocodb.com" |
||||
} |
||||
} |
||||
} |
||||
} |
||||
], |
||||
"responses": { |
||||
"200": { |
||||
"description": "Mailed password reset link", |
||||
"schema": { |
||||
"type": "boolean" |
||||
} |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
"/auth/email/validate/{tokenId}": { |
||||
"post": { |
||||
"tags": [ |
||||
"Authentication" |
||||
], |
||||
"summary": "Email validate link", |
||||
"description": "", |
||||
"operationId": "emailValidate", |
||||
"produces": [ |
||||
"application/json" |
||||
], |
||||
"parameters": [ |
||||
{ |
||||
"name": "tokenId", |
||||
"in": "path", |
||||
"description": "random token id received", |
||||
"required": true, |
||||
"type": "string", |
||||
"format": "uuid" |
||||
} |
||||
], |
||||
"responses": { |
||||
"200": { |
||||
"description": "Validated successfully" |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
"/auth/token/validate/{tokenId}": { |
||||
"get": { |
||||
"tags": [ |
||||
"Authentication" |
||||
], |
||||
"summary": "Validate password reset token", |
||||
"description": "", |
||||
"operationId": "passwordResetTokenValidate", |
||||
"produces": [ |
||||
"application/json" |
||||
], |
||||
"parameters": [ |
||||
{ |
||||
"name": "tokenId", |
||||
"in": "path", |
||||
"description": "random token id received", |
||||
"required": true, |
||||
"type": "string", |
||||
"format": "uuid" |
||||
} |
||||
], |
||||
"responses": { |
||||
"200": { |
||||
"description": "Validated successfully" |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
"/auth/password/reset/": { |
||||
"post": { |
||||
"tags": [ |
||||
"Authentication" |
||||
], |
||||
"summary": "Password reset", |
||||
"description": "", |
||||
"operationId": "passwordReset", |
||||
"consumes": [ |
||||
"application/json" |
||||
], |
||||
"produces": [ |
||||
"application/json" |
||||
], |
||||
"parameters": [ |
||||
{ |
||||
"name": "tokenId", |
||||
"in": "path", |
||||
"description": "random token id received", |
||||
"required": true, |
||||
"type": "string", |
||||
"format": "uuid" |
||||
}, |
||||
{ |
||||
"in": "body", |
||||
"name": "body", |
||||
"description": "Reset password details", |
||||
"required": true, |
||||
"schema": { |
||||
"type": "object", |
||||
"properties": { |
||||
"password": { |
||||
"type": "string", |
||||
"format": "password", |
||||
"example": "password", |
||||
"required": true |
||||
} |
||||
} |
||||
} |
||||
} |
||||
], |
||||
"responses": { |
||||
"200": { |
||||
"description": "Password reset successfully" |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
"/user/me": { |
||||
"get": { |
||||
"tags": [ |
||||
"Authentication" |
||||
], |
||||
"summary": "User details", |
||||
"description": "", |
||||
"operationId": "userDetails", |
||||
"produces": [ |
||||
"application/json" |
||||
], |
||||
"responses": { |
||||
"200": { |
||||
"description": "User details" |
||||
} |
||||
} |
||||
} |
||||
}, |
||||
"/user": { |
||||
"put": { |
||||
"tags": [ |
||||
"Authentication" |
||||
], |
||||
"summary": "Update user details", |
||||
"description": "", |
||||
"operationId": "updateUserDetails", |
||||
"consumes": [ |
||||
"application/json" |
||||
], |
||||
"produces": [ |
||||
"application/json" |
||||
], |
||||
"responses": { |
||||
"200": { |
||||
"description": "User details" |
||||
} |
||||
}, |
||||
"parameters": [ |
||||
{ |
||||
"in": "body", |
||||
"name": "body", |
||||
"description": "Updated user details", |
||||
"required": true, |
||||
"schema": { |
||||
"$ref": "#/definitions/user" |
||||
} |
||||
} |
||||
] |
||||
} |
||||
}, |
||||
"/user/password/change": { |
||||
"post": { |
||||
"tags": [ |
||||
"Authentication" |
||||
], |
||||
"summary": "Update user details", |
||||
"description": "", |
||||
"operationId": "passwordChange", |
||||
"consumes": [ |
||||
"application/json" |
||||
], |
||||
"produces": [ |
||||
"application/json" |
||||
], |
||||
"responses": { |
||||
"200": { |
||||
"description": "User details" |
||||
} |
||||
}, |
||||
"parameters": [ |
||||
{ |
||||
"in": "body", |
||||
"name": "body", |
||||
"description": "Current password and new password", |
||||
"required": true, |
||||
"schema": { |
||||
"type": "object", |
||||
"properties": { |
||||
"currentPassword": { |
||||
"type": "string", |
||||
"format": "password", |
||||
"example": "password" |
||||
}, |
||||
"newPassword": { |
||||
"type": "string", |
||||
"format": "password", |
||||
"example": "newPassword" |
||||
} |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
||||
} |
||||
}, |
||||
"definitions": { |
||||
"userAuth": { |
||||
"type": "object", |
||||
"properties": { |
||||
"email": { |
||||
"type": "string", |
||||
"format": "email", |
||||
"nullable": false, |
||||
"example": "test@nocodb.com" |
||||
}, |
||||
"password": { |
||||
"type": "string", |
||||
"format": "password", |
||||
"nullable": false, |
||||
"example": "password" |
||||
} |
||||
} |
||||
}, |
||||
"token": { |
||||
"type": "object", |
||||
"properties": { |
||||
"token": { |
||||
"type": "string", |
||||
"format": "email", |
||||
"nullable": false, |
||||
"example": "< JWT Token >" |
||||
} |
||||
} |
||||
}, |
||||
"user": { |
||||
"allOf": [ |
||||
{ |
||||
"$ref": "#/definitions/userAuth" |
||||
}, |
||||
{ |
||||
"type": "object", |
||||
"properties": { |
||||
"id": { |
||||
"type": "integer", |
||||
"nullable": false, |
||||
"readOnly": true |
||||
}, |
||||
"firstname": { |
||||
"type": "string", |
||||
"nullable": false, |
||||
"example": "FirstName" |
||||
}, |
||||
"lastname": { |
||||
"type": "string", |
||||
"nullable": false, |
||||
"example": "LastName" |
||||
}, |
||||
"roles": { |
||||
"type": "object", |
||||
"readOnly": true |
||||
}, |
||||
"created_at": { |
||||
"type": "string", |
||||
"readOnly": true |
||||
}, |
||||
"updated_at": { |
||||
"type": "string", |
||||
"readOnly": true |
||||
}, |
||||
"email_verified": { |
||||
"type": "boolean", |
||||
"readOnly": true |
||||
} |
||||
} |
||||
} |
||||
] |
||||
} |
||||
}, |
||||
"security": [ |
||||
{ |
||||
"xcAuth": [] |
||||
} |
||||
], |
||||
"externalDocs": { |
||||
"description": "Find out more about NocoDB", |
||||
"url": "http://nocodb.com" |
||||
}, |
||||
"securityDefinitions": { |
||||
"xcAuth": { |
||||
"type": "apiKey", |
||||
"in": "header", |
||||
"name": "xc-auth" |
||||
} |
||||
} |
||||
} |
File diff suppressed because one or more lines are too long
Loading…
Reference in new issue