From 161b08ee181dd1da8dc7720420665427f3295b2b Mon Sep 17 00:00:00 2001 From: Prabhjot Singh Sethi Date: Wed, 14 May 2025 15:57:34 +0000 Subject: [PATCH] Enable Initial auth constructs that can be used Signed-off-by: Prabhjot Singh Sethi --- auth/user.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) create mode 100644 auth/user.go diff --git a/auth/user.go b/auth/user.go new file mode 100644 index 0000000..5389852 --- /dev/null +++ b/auth/user.go @@ -0,0 +1,16 @@ +// Copyright © 2025 Prabhjot Singh Sethi, All Rights reserved +// Author: Prabhjot Singh Sethi + +package auth + +// Auth construct obtained as part of the auth action being performed +// while processing a request, this is json tagged to allow passing +// the inforamtion internally in the system between the microservices +// we can validate entities like user, devices, service accounts etc +type AuthInfo struct { + Realm string `json:"realm,omitempty"` + UserName string `json:"preferred_username"` + Email string `json:"email,omitempty"` + FullName string `json:"name,omitempty"` + SessionID string `json:"sid"` +}