mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-10 13:28:34 +00:00
Merge remote-tracking branch 'upstream/main' into feat/39
This commit is contained in:
@@ -22,8 +22,6 @@
|
||||
"query-string": "^7.1.1",
|
||||
"rimraf": "^3.0.2",
|
||||
"stripe": "^10.7.0",
|
||||
"swagger-jsdoc": "^6.2.5",
|
||||
"swagger-ui-express": "^4.6.0",
|
||||
"tweetnacl": "^1.0.3",
|
||||
"tweetnacl-util": "^0.15.1",
|
||||
"typescript": "^4.8.4"
|
||||
|
||||
@@ -106,7 +106,7 @@ const initializeDefaultOrg = async ({
|
||||
|
||||
// initialize a default workspace inside the new organization
|
||||
const workspace = await createWorkspace({
|
||||
name: `${user.firstName}'s Project`,
|
||||
name: `Example Project`,
|
||||
organizationId: organization._id.toString()
|
||||
});
|
||||
|
||||
|
||||
@@ -4,8 +4,6 @@ import cors from 'cors';
|
||||
import cookieParser from 'cookie-parser';
|
||||
import mongoose from 'mongoose';
|
||||
import dotenv from 'dotenv';
|
||||
import swaggerJSDoc from 'swagger-jsdoc';
|
||||
import swaggerUi from 'swagger-ui-express';
|
||||
|
||||
dotenv.config();
|
||||
import * as Sentry from '@sentry/node';
|
||||
@@ -68,39 +66,6 @@ if (NODE_ENV === 'production') {
|
||||
app.use(helmet());
|
||||
}
|
||||
|
||||
if (NODE_ENV === 'development') {
|
||||
const swaggerDefinition = {
|
||||
openapi: '3.0.0',
|
||||
info: {
|
||||
title: 'Infisical API',
|
||||
version: '1.0.0',
|
||||
description: 'Infisical is an open-source, E2EE tool to sync environment variables across your team and infrastructure.',
|
||||
license: {
|
||||
name: 'License',
|
||||
url: 'https://github.com/Infisical/infisical/blob/main/LICENSE'
|
||||
},
|
||||
contact: {
|
||||
name: 'Infisical',
|
||||
url: 'https://infisical.com'
|
||||
},
|
||||
},
|
||||
servers: [
|
||||
{
|
||||
url: 'http://localhost:8080/api/v1',
|
||||
description: 'Development server'
|
||||
}
|
||||
]
|
||||
}
|
||||
|
||||
const options = {
|
||||
swaggerDefinition,
|
||||
apis: ['./src/routes/*.ts']
|
||||
}
|
||||
|
||||
const swaggerSpec = swaggerJSDoc(options);
|
||||
app.use('/api/docs', swaggerUi.serve, swaggerUi.setup(swaggerSpec));
|
||||
}
|
||||
|
||||
app.use(express.json());
|
||||
|
||||
// routers
|
||||
|
||||
@@ -11,53 +11,6 @@ router.post(
|
||||
authController.getNewToken
|
||||
);
|
||||
|
||||
/**
|
||||
* @swagger
|
||||
* /auth/login1:
|
||||
* post:
|
||||
* summary: Return server's public key and user's salt for login via SRP.
|
||||
* description: As part of the 1st step of secure remote password (SRP), return server's public key and user's salt.
|
||||
* requestBody:
|
||||
* required: true
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* type: object
|
||||
* properties:
|
||||
* email:
|
||||
* type: string
|
||||
* description: Email of user
|
||||
* example: '[email protected]'
|
||||
* clientPublicKey:
|
||||
* type: string
|
||||
* description: Client-side SRP-generated public key
|
||||
* example: 'b13dc83cb...'
|
||||
* responses:
|
||||
* 200:
|
||||
* description: Object containing the server's public key and user's salt.
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* type: object
|
||||
* properties:
|
||||
* serverPublicKey:
|
||||
* type: string
|
||||
* description: Server-side SRP-generated public key
|
||||
* example: 'b13dc83cb...'
|
||||
* salt:
|
||||
* type: string
|
||||
* description: User's salt
|
||||
* example: 'dc1ac694f...'
|
||||
* 400:
|
||||
* content:
|
||||
* application/json:
|
||||
* schema:
|
||||
* type: object
|
||||
* properties:
|
||||
* message:
|
||||
* type: string
|
||||
* example: 'Failed to start authentication process'
|
||||
*/
|
||||
router.post(
|
||||
'/login1',
|
||||
loginLimiter,
|
||||
|
||||
Reference in New Issue
Block a user