You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@trafficcontrol.apache.org by GitBox <gi...@apache.org> on 2021/07/12 20:32:00 UTC

[GitHub] [trafficcontrol] ocket8888 commented on a change in pull request #6009: Logic to capture/display the last time a user successfully authenticated

ocket8888 commented on a change in pull request #6009:
URL: https://github.com/apache/trafficcontrol/pull/6009#discussion_r668235388



##########
File path: lib/go-tc/users.go
##########
@@ -107,20 +109,27 @@ type User struct {
 	commonUserFields
 }
 
-// UserV40 contains ChangeLogCount field
+// UserV40 contains ChangeLogCount field.
 type UserV40 struct {
 	User
-	ChangeLogCount *int `json:"changeLogCount" db:"change_log_count"`
+	ChangeLogCount    *int       `json:"changeLogCount" db:"change_log_count"`
+	LastAuthenticated *TimeNoMod `json:"lastAuthenticated" db:"last_authenticated"`
 }
 
-// UserCurrent represents the profile for the authenticated user
+// UserCurrent represents the profile for the authenticated user.
 type UserCurrent struct {
 	UserName  *string `json:"username"`
 	LocalUser *bool   `json:"localUser"`
 	RoleName  *string `json:"roleName"`
 	commonUserFields
 }
 
+// UserCurrentV40 contains LastAuthenticated field.
+type UserCurrentV40 struct {
+	UserCurrent
+	LastAuthenticated *TimeNoMod `json:"lastAuthenticated" db:"last_authenticated"`

Review comment:
       Can we just make this a `time.Time`? That way it comes out as RFC3339-formatted instead of our proprietary format.




-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscribe@trafficcontrol.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org