From 4d27eb40fb98d510874e6ac8af1ea8a64361551c Mon Sep 17 00:00:00 2001 From: Prabhjot Singh Sethi Date: Tue, 10 Jun 2025 14:58:18 +0000 Subject: [PATCH] Include roles in the auth info header Signed-off-by: Prabhjot Singh Sethi --- context/auth.go | 17 +++++++++-------- 1 file changed, 9 insertions(+), 8 deletions(-) diff --git a/context/auth.go b/context/auth.go index 6eb5586..06bf4e1 100644 --- a/context/auth.go +++ b/context/auth.go @@ -19,14 +19,15 @@ import ( // 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"` - EmailVerified bool `json:"email_verified,omitempty"` - FullName string `json:"name,omitempty"` - FirstName string `json:"given_name,omitempty"` - LastName string `json:"family_name,omitempty"` - SessionID string `json:"sid,omitempty"` + Realm string `json:"realm,omitempty"` + UserName string `json:"preferred_username"` + Email string `json:"email,omitempty"` + EmailVerified bool `json:"email_verified,omitempty"` + FullName string `json:"name,omitempty"` + FirstName string `json:"given_name,omitempty"` + LastName string `json:"family_name,omitempty"` + SessionID string `json:"sid,omitempty"` + Roles []string `json:"roles,omitempty"` } // struct identifier for the context