diff options
author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-09-12 18:37:30 +0200 |
---|---|---|
committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-09-12 18:40:00 +0200 |
commit | ae10e121875982d6956d6bff453544cc59a75616 (patch) | |
tree | 9b6508c9b2a105ce3027bb24342916050e2f50cc /pkg/service | |
parent | d33ba9ee675eedf47ce4a7977d116bf81dda5b2e (diff) | |
download | lens-ae10e121875982d6956d6bff453544cc59a75616.tar.gz lens-ae10e121875982d6956d6bff453544cc59a75616.tar.bz2 lens-ae10e121875982d6956d6bff453544cc59a75616.zip |
feat: Add admin control
Now only admins can access settings.
Diffstat (limited to 'pkg/service')
-rw-r--r-- | pkg/service/auth.go | 5 |
1 files changed, 1 insertions, 4 deletions
diff --git a/pkg/service/auth.go b/pkg/service/auth.go index 2fc06e3..3811965 100644 --- a/pkg/service/auth.go +++ b/pkg/service/auth.go @@ -147,15 +147,12 @@ func (u *AuthController) Upsert( } type ( - AuthKey string - Token struct { + Token struct { UserID uint Username string } ) -const TokenKey AuthKey = "token" - func ReadToken(data []byte, key []byte) (*Token, error) { block, err := aes.NewCipher(key) if err != nil { |