File tree Expand file tree Collapse file tree 3 files changed +8
-0
lines changed
Expand file tree Collapse file tree 3 files changed +8
-0
lines changed Original file line number Diff line number Diff line change @@ -51,13 +51,19 @@ func New() fiber.Handler {
5151 user_id = c .Locals ("user_id" ).(string )
5252 }
5353
54+ oidc_sub := ""
55+ if c .Locals ("oidc_sub" ) != nil {
56+ oidc_sub = c .Locals ("oidc_sub" ).(string )
57+ }
58+
5459 logger .Sugar ().WithOptions (
5560 zap .WithCaller (false ),
5661 ).Infow (
5762 "render engine request" ,
5863 "lmn_level" , "request" ,
5964 "log_id" , c .Locals ("log_id" ).(string ),
6065 "user_id" , user_id ,
66+ "oidc_sub" , oidc_sub ,
6167 "route" , c .Path (),
6268 "ip_address" , c .IPs (),
6369 "request_details" , formData ,
Original file line number Diff line number Diff line change @@ -91,6 +91,7 @@ func jwtValidation(c *fiber.Ctx, code string) error {
9191
9292 if claims , ok := token .Claims .(jwt.MapClaims ); ok && token .Valid {
9393 c .Locals ("user_id" , claims ["sub" ])
94+ c .Locals ("oidc_sub" , claims ["oidc_sub" ])
9495 c .Locals ("token" , code )
9596 return c .Next ()
9697 } else {
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ type User struct {
1515 ForceChange bool `json:"-" pg:"forceChange"`
1616 ObjectGUID string `json:"objectguid" pg:"objectguid"`
1717 AuthType string `json:"auth_type"`
18+ OidcSub string `json:"oidc_sub"`
1819}
1920
2021func (User ) TableName () string {
You can’t perform that action at this time.
0 commit comments