forgejo/models/auth
Gusted f3f888ed13
[GITEA] Fix session generation for database
- If the session doesn't exist, it shouldn't be expected that the
variable is non-nil. Define the session variable instead and insert that.
- Add unit tests to test the behavior of the database sessions code .
- Regression caused by dd30d9d5c0.
- Resolves https://codeberg.org/forgejo/forgejo/issues/2042

(cherry picked from commit 90307ad200)
(cherry picked from commit 874ef1978d)
(cherry picked from commit 27d5f035fc)
(cherry picked from commit 65dbc4303b)

[GITEA] Fix session generation for database (squash) timeutil.Mock

because of e743570f65 * Refactor timeutil package (#28623)

(cherry picked from commit acc6b51be2)
(cherry picked from commit 02b74317f2)
(cherry picked from commit 63b9b624bd)
(cherry picked from commit 7752ff8baa)
(cherry picked from commit c0af4d9438)
2024-02-05 16:09:41 +01:00
..
access_token.go
access_token_scope.go [GITEA] silently ignore obsolete sudo scope 2024-02-05 16:05:50 +01:00
access_token_scope_test.go [GITEA] silently ignore obsolete sudo scope 2024-02-05 16:05:50 +01:00
access_token_test.go
auth_token.go
main_test.go
oauth2.go
oauth2_list.go
oauth2_test.go
session.go
session_test.go [GITEA] Fix session generation for database 2024-02-05 16:09:41 +01:00
source.go
source_test.go
twofactor.go [GITEA] Drop sha256-simd in favor of stdlib 2024-02-05 16:09:40 +01:00
webauthn.go
webauthn_test.go