code.gitea.io/gitea@v1.21.7/services/auth/source/oauth2/source_authenticate.go (about) 1 // Copyright 2021 The Gitea Authors. All rights reserved. 2 // SPDX-License-Identifier: MIT 3 4 package oauth2 5 6 import ( 7 "context" 8 9 user_model "code.gitea.io/gitea/models/user" 10 "code.gitea.io/gitea/services/auth/source/db" 11 ) 12 13 // Authenticate falls back to the db authenticator 14 func (source *Source) Authenticate(ctx context.Context, user *user_model.User, login, password string) (*user_model.User, error) { 15 return db.Authenticate(ctx, user, login, password) 16 } 17 18 // NB: Oauth2 does not implement LocalTwoFASkipper for password authentication 19 // as its password authentication drops to db authentication