app-cloudep-portal-api-gateway/internal/payload/token.go

23 lines
445 B
Go
Raw Permalink Normal View History

2024-08-27 07:40:00 +00:00
package payload
import (
"app-cloudep-portal-api-gateway/internal/domain"
"context"
)
func UID(ctx context.Context) string {
return ctx.Value(domain.UidCode).(string)
}
func Scope(ctx context.Context) string {
return ctx.Value(domain.ScopeCode).(string)
}
func Role(ctx context.Context) string {
return ctx.Value(domain.RoleCode).(string)
}
func DeviceID(ctx context.Context) string {
return ctx.Value(domain.DeviceIDCode).(string)
}