userid ass mfa session key

This commit is contained in:
catusax
2023-07-24 11:58:36 +08:00
parent 9f52c08883
commit ba0cf189de
6 changed files with 44 additions and 21 deletions

View File

@@ -12,12 +12,12 @@ type Provider interface {
DeleteAllUserSessions(userId string) error
// DeleteSessionForNamespace deletes the session for a given namespace
DeleteSessionForNamespace(namespace string) error
// SetMfaSession sets the mfa session with key and value of email
SetMfaSession(email, key string, expiration int64) error
// SetMfaSession sets the mfa session with key and value of userId
SetMfaSession(userId, key string, expiration int64) error
// GetMfaSession returns value of given mfa session
GetMfaSession(email, key string) (string, error)
GetMfaSession(userId, key string) (string, error)
// DeleteMfaSession deletes given mfa session from in-memory store.
DeleteMfaSession(email, key string) error
DeleteMfaSession(userId, key string) error
// SetState sets the login state (key, value form) in the session store
SetState(key, state string) error