mirror of
https://github.com/awatertrevi/infisical.git
synced 2026-10-02 20:25:47 +00:00
Add separate ServiceTokenV3 auth type
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
export enum ActorType {
|
||||
USER = "user",
|
||||
SERVICE = "service"
|
||||
SERVICE = "service",
|
||||
SERVICE_V3 = "service-v3"
|
||||
}
|
||||
|
||||
export enum UserAgentType {
|
||||
|
||||
@@ -23,9 +23,15 @@ export interface ServiceActor {
|
||||
metadata: ServiceActorMetadata;
|
||||
}
|
||||
|
||||
export interface ServiceActorV3 {
|
||||
type: ActorType.SERVICE_V3;
|
||||
metadata: ServiceActorMetadata;
|
||||
}
|
||||
|
||||
export type Actor =
|
||||
| UserActor
|
||||
| ServiceActor;
|
||||
| ServiceActor
|
||||
| ServiceActorV3;
|
||||
|
||||
interface GetSecretsEvent {
|
||||
type: EventType.GET_SECRETS;
|
||||
|
||||
@@ -257,7 +257,7 @@ export const getAuthSTDPayload = async ({
|
||||
|
||||
return {
|
||||
actor: {
|
||||
type: ActorType.SERVICE, // should this be servicev3 bc the shape of it is different?
|
||||
type: ActorType.SERVICE_V3, // should this be servicev3 bc the shape of it is different?
|
||||
metadata: {
|
||||
serviceId: serviceTokenData._id.toString(),
|
||||
name: serviceTokenData.name
|
||||
|
||||
Reference in New Issue
Block a user