mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2026-05-28 11:14:54 -04:00
feat: enable auth to git LFS via authorized integrations
This commit is contained in:
parent
50e1ac27bc
commit
263d7f84d0
3 changed files with 7 additions and 0 deletions
|
|
@ -9,6 +9,7 @@ import (
|
|||
"time"
|
||||
|
||||
"forgejo.org/modules/util"
|
||||
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
)
|
||||
|
||||
|
|
|
|||
|
|
@ -134,6 +134,11 @@ func buildGitLfsAuthGroup() *auth_method.Group {
|
|||
group.Add(&auth_method.Basic{})
|
||||
group.Add(&auth_method.AccessToken{})
|
||||
group.Add(&auth_method.ActionTaskToken{})
|
||||
group.Add(&auth_method.AuthorizedIntegration{
|
||||
// "Authorization: Basic ..." is easier to use for git operations, and already supported for other tokens, so it
|
||||
// is enabled for Authorized Integrations as well:
|
||||
PermitBasic: true,
|
||||
})
|
||||
return group
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import (
|
|||
"forgejo.org/modules/lfs"
|
||||
"forgejo.org/modules/setting"
|
||||
"forgejo.org/services/auth"
|
||||
|
||||
"github.com/golang-jwt/jwt/v5"
|
||||
)
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue