MCPcopy Create free account
hub / github.com/gogs/gogs / AuthenticateUser

Method AuthenticateUser

internal/context/auth.go:138–138  ·  view source on GitHub ↗

AuthenticateUser validates username and password via given login source ID. It returns database.ErrUserNotExist when the user was not found. When the "loginSourceID" is negative, it aborts the process and returns database.ErrUserNotExist if the user was not found in the database. When the "loginSo

(ctx context.Context, login, password string, loginSourceID int64)

Source from the content-addressed store, hash-verified

136 // When the "loginSourceID" is positive, it tries to authenticate via given
137 // login source and creates a new user when not yet exists in the database.
138 AuthenticateUser(ctx context.Context, login, password string, loginSourceID int64) (*database.User, error)
139}
140
141// authenticatedUserID returns the ID of the authenticated user, along with a bool value

Callers 1

authenticatedUserFunction · 0.65

Implementers 4

storeinternal/context/store.go
MockStoreinternal/route/lfs/mocks_test.go
storeinternal/route/lfs/store.go
storeinternal/route/repo/store.go

Calls

no outgoing calls

Tested by

no test coverage detected