🔒 token encryption

This commit is contained in:
landaiqing
2024-08-14 19:57:37 +08:00
parent 368adadf52
commit 55759a33db
19 changed files with 241 additions and 39 deletions

View File

@@ -1,6 +1,7 @@
package model
import (
"encoding/json"
"time"
)
@@ -22,3 +23,11 @@ type ScaAuthRole struct {
func (*ScaAuthRole) TableName() string {
return TableNameScaAuthRole
}
func (role *ScaAuthRole) MarshalBinary() ([]byte, error) {
return json.Marshal(role)
}
func (role *ScaAuthRole) UnmarshalBinary(data []byte) error {
return json.Unmarshal(data, role)
}