MCPcopy Create free account
hub / github.com/0xUnixIO/pulse / randomToken

Function randomToken

internal/auth/auth.go:159–165  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

157}
158
159func randomToken() string {
160 buf := make([]byte, 32)
161 if _, err := rand.Read(buf); err != nil {
162 panic("crypto/rand unavailable: " + err.Error())
163 }
164 return hex.EncodeToString(buf)
165}
166
167// DeleteAllSessions 使所有管理员 session 失效(改密后调用)。
168func (m *Manager) DeleteAllSessions() error {

Callers 4

HandleLoginMethod · 0.70
LoginMethod · 0.70
LoginFromRequestMethod · 0.70
CreateSessionMethod · 0.70

Calls 2

ReadMethod · 0.45
ErrorMethod · 0.45

Tested by

no test coverage detected