Skip to content

Commit

Permalink
Fixing for missing key id in memory map
Browse files Browse the repository at this point in the history
  • Loading branch information
Garrod Alwood authored and lorodoes committed Sep 23, 2024
1 parent 5861159 commit ff4e107
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion samlsp/session_jwt.go
Original file line number Diff line number Diff line change
Expand Up @@ -130,7 +130,10 @@ func (c JWTSessionCodec) Decode(signed string) (Session, error) {
log.Debugf("UserID: %s", UserId)
UserIdString := strings.Join(UserId, "")
log.Debugf("String UserID: %s", UserIdString)
mapstring := saml.UserAttributes[UserIdString]
mapstring, ok := saml.UserAttributes[UserIdString]
if !ok {
return nil, ErrNoSession
}
log.Debugf("map String: %#v", mapstring)
var attributes map[string][]string
json.Unmarshal([]byte(mapstring), &attributes)
Expand Down

0 comments on commit ff4e107

Please sign in to comment.