diff options
author | Lunny Xiao <xiaolunwen@gmail.com> | 2021-11-24 17:49:20 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-24 17:49:20 +0800 |
commit | a666829a37be6f9fd98f9e7dd1767c420f7f3b32 (patch) | |
tree | 9ab1434b759a8a2cb275a83149903a823851e309 /services/auth/interface.go | |
parent | 4e7ca946da2a2642a62f114825129bf5d7ed9196 (diff) | |
download | gitea-a666829a37be6f9fd98f9e7dd1767c420f7f3b32.tar.gz gitea-a666829a37be6f9fd98f9e7dd1767c420f7f3b32.zip |
Move user related model into models/user (#17781)
* Move user related model into models/user
* Fix lint for windows
* Fix windows lint
* Fix windows lint
* Move some tests in models
* Merge
Diffstat (limited to 'services/auth/interface.go')
-rw-r--r-- | services/auth/interface.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/services/auth/interface.go b/services/auth/interface.go index a198fbe5b8..a05ece2078 100644 --- a/services/auth/interface.go +++ b/services/auth/interface.go @@ -8,7 +8,7 @@ import ( "context" "net/http" - "code.gitea.io/gitea/models" + user_model "code.gitea.io/gitea/models/user" "code.gitea.io/gitea/modules/session" "code.gitea.io/gitea/modules/web/middleware" ) @@ -26,7 +26,7 @@ type Method interface { // or a new user object (with id = 0) populated with the information that was found // in the authentication data (username or email). // Returns nil if verification fails. - Verify(http *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *models.User + Verify(http *http.Request, w http.ResponseWriter, store DataStore, sess SessionStore) *user_model.User } // Initializable represents a structure that requires initialization @@ -51,7 +51,7 @@ type Freeable interface { // PasswordAuthenticator represents a source of authentication type PasswordAuthenticator interface { - Authenticate(user *models.User, login, password string) (*models.User, error) + Authenticate(user *user_model.User, login, password string) (*user_model.User, error) } // LocalTwoFASkipper represents a source of authentication that can skip local 2fa |