Documentation ¶
Index ¶
- Constants
- func AddToRequestCtx(id Identity, r *http.Request) *http.Request
- type Identity
- type User
- func (u *User) Attributes() map[string]interface{}
- func (u *User) AuthTime() time.Time
- func (u *User) Authenticated() bool
- func (u *User) DelAttribute(s string)
- func (u *User) DisplayName() string
- func (u *User) Domain() string
- func (u *User) Email() string
- func (u *User) Expiry() time.Time
- func (u *User) GetAttribute(s string) interface{}
- func (u *User) Marshal() ([]byte, error)
- func (u *User) SessionId() string
- func (u *User) SetAttribute(s string, i 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) SetEmail(s string)
- func (u *User) SetExpiry(t time.Time)
- func (u *User) SetUserName(s string)
- func (u *User) Unmarshal(b []byte) error
- func (u *User) UserName() string
Constants ¶
View Source
const ( CTXKey = "github.com/pbvdven/rdpgw/common/identity" AttrRemoteAddr = "remoteAddr" AttrClientIp = "clientIp" AttrProxies = "proxyAddresses" AttrAccessToken = "accessToken" // todo remove for security reasons )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Identity ¶
type Identity interface { UserName() string SetUserName(string) DisplayName() string SetDisplayName(string) Domain() string SetDomain(string) Authenticated() bool SetAuthenticated(bool) AuthTime() time.Time SetAuthTime(time2 time.Time) SessionId() string SetAttribute(string, interface{}) GetAttribute(string) interface{} Attributes() map[string]interface{} DelAttribute(string) Email() string SetEmail(string) Expiry() time.Time SetExpiry(time.Time) Marshal() ([]byte, error) Unmarshal([]byte) error }
func FromRequestCtx ¶
type User ¶
type User struct {
// contains filtered or unexported fields
}
func (*User) Attributes ¶
func (*User) Authenticated ¶
func (*User) DelAttribute ¶
func (*User) DisplayName ¶
func (*User) GetAttribute ¶
func (*User) SetAttribute ¶
func (*User) SetAuthTime ¶
func (*User) SetAuthenticated ¶
func (*User) SetDisplayName ¶
func (*User) SetUserName ¶
Click to show internal directories.
Click to hide internal directories.