23 lines
445 B
Go
23 lines
445 B
Go
|
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)
|
||
|
}
|