mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-07 12:27:28 +00:00
Begin service token v3
This commit is contained in:
@@ -0,0 +1,28 @@
|
|||||||
|
import { Document, Schema, Types, model } from "mongoose";
|
||||||
|
|
||||||
|
export interface IServiceTokenV3 extends Document {
|
||||||
|
_id: Types.ObjectId;
|
||||||
|
name: string;
|
||||||
|
workspace: Types.ObjectId;
|
||||||
|
publicKey: string;
|
||||||
|
}
|
||||||
|
|
||||||
|
const serviceTokenV3Schema = new Schema(
|
||||||
|
{
|
||||||
|
name: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
workspace: {
|
||||||
|
type: Schema.Types.ObjectId,
|
||||||
|
ref: "Workspace",
|
||||||
|
required: true
|
||||||
|
},
|
||||||
|
publicKey: {
|
||||||
|
type: String,
|
||||||
|
required: true
|
||||||
|
}
|
||||||
|
}
|
||||||
|
);
|
||||||
|
|
||||||
|
export const ServiceTokenV3 = model<IServiceTokenV3>("ServiceTokenV3", serviceTokenV3Schema);
|
||||||
+5
-1
@@ -1,7 +1,11 @@
|
|||||||
import { ServiceTokenSection } from "../ServiceTokenSection";
|
import { ServiceTokenSection } from "../ServiceTokenSection";
|
||||||
|
import { ServiceTokenV3Section } from "../ServiceTokenV3Section";
|
||||||
|
|
||||||
export const ProjectServiceTokensTab = () => {
|
export const ProjectServiceTokensTab = () => {
|
||||||
return (
|
return (
|
||||||
<ServiceTokenSection />
|
<>
|
||||||
|
<ServiceTokenV3Section />
|
||||||
|
<ServiceTokenSection />
|
||||||
|
</>
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
export const AddServiceTokenV3Modal = () => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
AddServiceTokenV3Modal
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
+14
@@ -0,0 +1,14 @@
|
|||||||
|
import { AddServiceTokenV3Modal } from "./AddServiceTokenV3Modal";
|
||||||
|
import { ServiceTokenV3Table } from "./ServiceTokenV3Table";
|
||||||
|
|
||||||
|
export const ServiceTokenV3Section = () => {
|
||||||
|
return (
|
||||||
|
<div className="mb-6 rounded-lg border border-mineshaft-600 bg-mineshaft-900 p-4">
|
||||||
|
<p className="text-xl font-semibold text-mineshaft-100">
|
||||||
|
Service Tokens 2.0
|
||||||
|
</p>
|
||||||
|
<ServiceTokenV3Table />
|
||||||
|
<AddServiceTokenV3Modal />
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
+7
@@ -0,0 +1,7 @@
|
|||||||
|
export const ServiceTokenV3Table = () => {
|
||||||
|
return (
|
||||||
|
<div>
|
||||||
|
ServiceTokenV3Table
|
||||||
|
</div>
|
||||||
|
);
|
||||||
|
}
|
||||||
+1
@@ -0,0 +1 @@
|
|||||||
|
export { ServiceTokenV3Section } from "./ServiceTokenV3Section";
|
||||||
Reference in New Issue
Block a user