Skip to content

Commit

Permalink
Merge branch 'master' into feat_dev_grants_2x
Browse files Browse the repository at this point in the history
  • Loading branch information
supercairos committed Nov 24, 2023
2 parents 0e6f5fa + dfa2c0a commit b1fbd36
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 3 deletions.
3 changes: 0 additions & 3 deletions session.go
Original file line number Diff line number Diff line change
Expand Up @@ -52,9 +52,6 @@ func (s *DefaultSession) GetExpiresAt(key TokenType) time.Time {
s.ExpiresAt = make(map[TokenType]time.Time)
}

if _, ok := s.ExpiresAt[key]; !ok {
return time.Time{}
}
return s.ExpiresAt[key]
}

Expand Down
8 changes: 8 additions & 0 deletions session_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,3 +15,11 @@ func TestSession(t *testing.T) {
assert.Empty(t, s.GetUsername())
assert.Nil(t, s.Clone())
}

func TestZeroSession(t *testing.T) {
var s *DefaultSession = new(DefaultSession)
assert.Empty(t, s.GetSubject())
assert.Empty(t, s.GetUsername())
assert.Empty(t, s.Clone())
assert.Empty(t, s.GetExpiresAt(AccessToken))
}

0 comments on commit b1fbd36

Please sign in to comment.