Documentation
¶
Index ¶
Constants ¶
View Source
const HeaderIdentity = contextKeyType("x-userinfo")
View Source
const KeyIdentity = contextKeyType("authorization")
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Identity ¶
type Identity struct {
Email string
Name string
UserName string
Raw string
// contains filtered or unexported fields
}
func IdentityFromContext ¶
IdentityFromContext 如果userInfoKey不存在,返回结果为nil
func NewIdentity ¶
func (*Identity) Authenticated ¶
Click to show internal directories.
Click to hide internal directories.