MCPcopy
hub / github.com/gofiber/fiber / Regenerate

Method Regenerate

middleware/session/session.go:239–241  ·  view source on GitHub ↗

Regenerate generates a new session id and deletes the old one from storage. Returns: - error: An error if the regeneration fails. Usage: err := s.Regenerate()

()

Source from the content-addressed store, hash-verified

237//
238// err := s.Regenerate()
239func (s *Session) Regenerate() error {
240 return s.RegenerateWithContext(s.resolveContext())
241}
242
243// RegenerateWithContext generates a new session id and deletes the old one from storage,
244// using the provided context for cancellation and timeout control.

Callers 3

Test_Session_MiddlewareFunction · 0.45
Test_Store_GetByIDFunction · 0.45
Test_Session_RegenerateFunction · 0.45

Calls 2

RegenerateWithContextMethod · 0.95
resolveContextMethod · 0.95

Tested by 3

Test_Session_MiddlewareFunction · 0.36
Test_Store_GetByIDFunction · 0.36
Test_Session_RegenerateFunction · 0.36