diff options
author | wxiaoguang <wxiaoguang@gmail.com> | 2024-02-16 23:18:30 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-02-16 15:18:30 +0000 |
commit | 45c15387b292c25b5d0572b2eb3f85414156372a (patch) | |
tree | cb3052845543958872adcab501c87871502a525e /cmd | |
parent | 7132a0ba75d6fe734d9f950f217a5ceb81375328 (diff) | |
download | gitea-45c15387b292c25b5d0572b2eb3f85414156372a.tar.gz gitea-45c15387b292c25b5d0572b2eb3f85414156372a.zip |
Refactor JWT secret generating & decoding code (#29172)
Old code is not consistent for generating & decoding the JWT secrets.
Now, the callers only need to use 2 consistent functions:
NewJwtSecretWithBase64 and DecodeJwtSecretBase64
And remove a non-common function Base64FixedDecode from util.go
Diffstat (limited to 'cmd')
-rw-r--r-- | cmd/generate.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/cmd/generate.go b/cmd/generate.go index 4ab10da22a..90b32ecaf0 100644 --- a/cmd/generate.go +++ b/cmd/generate.go @@ -70,7 +70,7 @@ func runGenerateInternalToken(c *cli.Context) error { } func runGenerateLfsJwtSecret(c *cli.Context) error { - _, jwtSecretBase64, err := generate.NewJwtSecretBase64() + _, jwtSecretBase64, err := generate.NewJwtSecretWithBase64() if err != nil { return err } |