Add separate ServiceTokenV3 auth type

This commit is contained in:
Tuan Dang
2023-09-22 14:43:42 +01:00
parent 53856ff868
commit f59b3b3305
3 changed files with 10 additions and 3 deletions
+2 -1
View File
@@ -1,6 +1,7 @@
export enum ActorType {
USER = "user",
SERVICE = "service"
SERVICE = "service",
SERVICE_V3 = "service-v3"
}
export enum UserAgentType {
+7 -1
View File
@@ -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;
+1 -1
View File
@@ -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