🔒 token encryption
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package model
|
||||
|
||||
import (
|
||||
"encoding/json"
|
||||
"time"
|
||||
)
|
||||
|
||||
@@ -29,3 +30,11 @@ type ScaAuthPermission struct {
|
||||
func (*ScaAuthPermission) TableName() string {
|
||||
return TableNameScaAuthPermission
|
||||
}
|
||||
|
||||
func (permission *ScaAuthPermission) MarshalBinary() ([]byte, error) {
|
||||
return json.Marshal(permission)
|
||||
}
|
||||
|
||||
func (permission *ScaAuthPermission) UnmarshalBinary(data []byte) error {
|
||||
return json.Unmarshal(data, permission)
|
||||
}
|
||||
|
@@ -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)
|
||||
}
|
||||
|
Reference in New Issue
Block a user