1
0
Fork 0
mirror of https://codeberg.org/forgejo/forgejo.git synced 2025-03-09 15:19:22 +00:00
forgejo/services/auth
wxiaoguang 6b33152b7d
Decouple the different contexts from each other ()
Replace 

Close 

Mixing different Gitea contexts together causes some problems:

1. Unable to respond proper content when error occurs, eg: Web should
respond HTML while API should respond JSON
2. Unclear dependency, eg: it's unclear when Context is used in
APIContext, which fields should be initialized, which methods are
necessary.


To make things clear, this PR introduces a Base context, it only
provides basic Req/Resp/Data features.

This PR mainly moves code. There are still many legacy problems and
TODOs in code, leave unrelated changes to future PRs.
2023-05-21 09:50:53 +08:00
..
source Add Alpine package registry () 2023-05-12 17:27:50 +00:00
auth.go Refactor cookie () 2023-04-13 15:45:33 -04:00
auth_test.go Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
basic.go Require repo scope for PATs for private repos and basic authentication () 2023-04-26 19:24:03 -05:00
group.go refactor auth interface to return error when verify failure () 2022-12-28 13:53:28 +08:00
httpsign.go refactor auth interface to return error when verify failure () 2022-12-28 13:53:28 +08:00
interface.go Improve template system and panic recovery () 2023-05-04 14:36:34 +08:00
middleware.go Decouple the different contexts from each other () 2023-05-21 09:50:53 +08:00
oauth2.go Implement actions () 2023-01-31 09:45:19 +08:00
reverseproxy.go Do not send "registration success email" for external auth sources () 2023-05-10 10:49:47 +00:00
session.go refactor auth interface to return error when verify failure () 2022-12-28 13:53:28 +08:00
signin.go Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
source.go Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00
sspi_windows.go Do not send "registration success email" for external auth sources () 2023-05-10 10:49:47 +00:00
sync.go Implement FSFE REUSE for golang files () 2022-11-27 18:20:29 +00:00