github.com/wostzone/hub/auth@v0.0.0-20220118060317-7bb375743b17/pkg/authenticate/IUnpwStore.go (about) 1 package authenticate 2 3 // IUnpwStore defined the interface for accessing the username-password store 4 type IUnpwStore interface { 5 // Close the store 6 Close() 7 8 // GetPasswordHash returns the password hash for the user, or "" if the user is not found 9 GetPasswordHash(username string) string 10 11 // Open the store 12 Open() error 13 14 // SetPasswordHash writes and updates the password for the given user 15 // loginID is the login ID of the user whose hash to write 16 // hash is the calculated password hash to store. This is independent of the hashing algorithm. 17 // Returns error if the store isn't writable 18 SetPasswordHash(loginID string, hash string) error 19 }