gitea源码

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