MCPcopy Index your code
hub / github.com/dnote/dnote / SignIn

Method SignIn

pkg/server/app/users.go:202–214  ·  view source on GitHub ↗

SignIn signs in a user

(user *database.User)

Source from the content-addressed store, hash-verified

200
201// SignIn signs in a user
202func (a *App) SignIn(user *database.User) (*database.Session, error) {
203 err := a.TouchLastLoginAt(*user, a.DB)
204 if err != nil {
205 log.ErrorWrap(err, "touching login timestamp")
206 }
207
208 session, err := a.CreateSession(user.ID)
209 if err != nil {
210 return nil, pkgErrors.Wrap(err, "creating session")
211 }
212
213 return &session, nil
214}

Callers 2

CreateMethod · 0.80
loginMethod · 0.80

Calls 3

TouchLastLoginAtMethod · 0.95
CreateSessionMethod · 0.95
ErrorWrapFunction · 0.92

Tested by

no test coverage detected