From 963d8a1dfe63863a50a205db81a46720e7f83149 Mon Sep 17 00:00:00 2001 From: d1slike Date: Tue, 26 Jul 2022 21:23:24 +0300 Subject: [PATCH] MSP-437 add system service domains --- domain/auth.go | 8 ++++++++ domain/system.go | 20 ++++++++++++++++++++ 2 files changed, 28 insertions(+) create mode 100644 domain/auth.go create mode 100644 domain/system.go diff --git a/domain/auth.go b/domain/auth.go new file mode 100644 index 0000000..1813906 --- /dev/null +++ b/domain/auth.go @@ -0,0 +1,8 @@ +package domain + +type AuthData struct { + SystemId int + DomainId int + ServiceId int + ApplicationId int +} diff --git a/domain/system.go b/domain/system.go new file mode 100644 index 0000000..445dfc1 --- /dev/null +++ b/domain/system.go @@ -0,0 +1,20 @@ +package domain + +type AuthenticateRequest struct { + Token string +} + +type AuthenticateResponse struct { + Authenticated bool + ErrorReason string + AuthData *AuthData +} + +type AuthorizeRequest struct { + ApplicationId int + Endpoint string +} + +type AuthorizeResponse struct { + Authorized bool +}