Documentation ¶
Index ¶
- Constants
- func AddToHTTPRequestContext(id Identity, r *http.Request) *http.Request
- type Authenticator
- type Identity
- type User
- func (u *User) AddAuthzAttribute(a string)
- func (u *User) Attributes() map[string]interface{}
- func (u *User) AuthTime() time.Time
- func (u *User) Authenticated() bool
- func (u *User) Authorized(a string) bool
- func (u *User) AuthzAttributes() []string
- func (u *User) DisableAuthzAttribute(a string)
- func (u *User) DisplayName() string
- func (u *User) Domain() string
- func (u *User) EnableAuthzAttribute(a string)
- func (u *User) Expired() bool
- func (u *User) Human() bool
- func (u *User) Marshal() ([]byte, error)
- func (u *User) RemoveAttribute(k string)
- func (u *User) RemoveAuthzAttribute(a string)
- func (u *User) SessionID() string
- func (u *User) SetAttribute(k string, v interface{})
- func (u *User) SetAttributes(a map[string]interface{})
- func (u *User) SetAuthTime(t time.Time)
- func (u *User) SetAuthenticated(b bool)
- func (u *User) SetDisplayName(s string)
- func (u *User) SetDomain(s string)
- func (u *User) SetExpiry(t time.Time)
- func (u *User) SetHuman(b bool)
- func (u *User) SetUserName(s string)
- func (u *User) Unmarshal(b []byte) error
- func (u *User) UserName() string
Constants ¶
View Source
const (
CTXKey = "jcmturner/goidentity"
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Authenticator ¶
type Identity ¶
type Identity interface { UserName() string SetUserName(s string) Domain() string SetDomain(s string) DisplayName() string SetDisplayName(s string) Human() bool SetHuman(b bool) AuthTime() time.Time SetAuthTime(t time.Time) AuthzAttributes() []string AddAuthzAttribute(a string) RemoveAuthzAttribute(a string) Authenticated() bool SetAuthenticated(b bool) Authorized(a string) bool SessionID() string Expired() bool Attributes() map[string]interface{} SetAttribute(k string, v interface{}) SetAttributes(map[string]interface{}) RemoveAttribute(k string) Marshal() ([]byte, error) Unmarshal([]byte) error }
func FromHTTPRequestContext ¶
type User ¶
type User struct {
// contains filtered or unexported fields
}
func (*User) AddAuthzAttribute ¶
func (*User) Attributes ¶
func (*User) Authenticated ¶
func (*User) Authorized ¶
func (*User) AuthzAttributes ¶
func (*User) DisableAuthzAttribute ¶
func (*User) DisplayName ¶
func (*User) EnableAuthzAttribute ¶
func (*User) RemoveAttribute ¶
func (*User) RemoveAuthzAttribute ¶
func (*User) SetAttribute ¶
func (*User) SetAttributes ¶
func (*User) SetAuthTime ¶
func (*User) SetAuthenticated ¶
func (*User) SetDisplayName ¶
func (*User) SetUserName ¶
Click to show internal directories.
Click to hide internal directories.