2 Star 1 Fork 0

liudaka / artifactory

加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
克隆/下载
source.go 979 Bytes
一键复制 编辑 原始数据 按行查看 历史
geeeekegeeeeke 提交于 2023-12-05 16:49 . fix:
// Copyright 2021 The Gitea Authors. All rights reserved.
// SPDX-License-Identifier: MIT
package db
import (
"context"
"gitee.com/daka1004/artifactory/backend/app/model/auth"
user_model "gitee.com/daka1004/artifactory/backend/app/model/user"
)
// Source is a password authentication service
type Source struct{}
// FromDB fills up an OAuth2Config from serialized format.
func (source *Source) FromDB(bs []byte) error {
return nil
}
// ToDB exports an SMTPConfig to a serialized format.
func (source *Source) ToDB() ([]byte, error) {
return nil, nil
}
// Authenticate queries if login/password is valid against the PAM,
// and create a local user if success when enabled.
func (source *Source) Authenticate(ctx context.Context, user *user_model.User, login, password string) (*user_model.User, error) {
return Authenticate(ctx, user, login, password)
}
func init() {
auth.RegisterTypeConfig(auth.NoType, &Source{})
auth.RegisterTypeConfig(auth.Plain, &Source{})
}
Go
1
https://gitee.com/daka1004/artifactory.git
git@gitee.com:daka1004/artifactory.git
daka1004
artifactory
artifactory
495e01fd4b9f

搜索帮助