diff --git a/modules/lfs/shared.go b/modules/lfs/shared.go index 3e171643e1..3e7b002484 100644 --- a/modules/lfs/shared.go +++ b/modules/lfs/shared.go @@ -9,6 +9,7 @@ import ( "time" "forgejo.org/modules/util" + "github.com/golang-jwt/jwt/v5" ) diff --git a/routers/web/web.go b/routers/web/web.go index d92b62def5..df97edd558 100644 --- a/routers/web/web.go +++ b/routers/web/web.go @@ -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 } diff --git a/services/auth/method/lfs_token.go b/services/auth/method/lfs_token.go index fd0e51a79f..7e066e5fb9 100644 --- a/services/auth/method/lfs_token.go +++ b/services/auth/method/lfs_token.go @@ -12,6 +12,7 @@ import ( "forgejo.org/modules/lfs" "forgejo.org/modules/setting" "forgejo.org/services/auth" + "github.com/golang-jwt/jwt/v5" )