From 91e7a242f2a672d5c725091a96078fba8da14758 Mon Sep 17 00:00:00 2001 From: Roland Osborne Date: Mon, 12 Sep 2022 23:59:16 -0700 Subject: [PATCH] returning account guid in attach request --- doc/api.oa3 | 3 +++ net/server/internal/api_addAccountApp.go | 1 + net/server/internal/models.go | 2 ++ 3 files changed, 6 insertions(+) diff --git a/doc/api.oa3 b/doc/api.oa3 index a369ea0e..f0858b8b 100644 --- a/doc/api.oa3 +++ b/doc/api.oa3 @@ -3230,9 +3230,12 @@ components: LoginAccess { type: object required: + - guid - appToken - created properties: + guid: + type: string appToken: type: string created: diff --git a/net/server/internal/api_addAccountApp.go b/net/server/internal/api_addAccountApp.go index 55597dd0..0384a253 100644 --- a/net/server/internal/api_addAccountApp.go +++ b/net/server/internal/api_addAccountApp.go @@ -55,6 +55,7 @@ func AddAccountApp(w http.ResponseWriter, r *http.Request) { } login := LoginAccess{ + GUID: account.GUID, AppToken: account.GUID + "." + access, Created: app.Created, } diff --git a/net/server/internal/models.go b/net/server/internal/models.go index ceac4df9..3d3f274b 100644 --- a/net/server/internal/models.go +++ b/net/server/internal/models.go @@ -318,6 +318,8 @@ type IDList struct { //LoginAccess response object when app is associated type LoginAccess struct { + GUID string `json:"guid"` + AppToken string `json:"appToken"` Created int64 `json:"created"`