Documentation ¶
Index ¶
- func HandleUsernameOnlyLogging(w http.ResponseWriter, r *http.Request, redirect string) error
- func UsernameOnlyLoggingForm(w http.ResponseWriter, r *http.Request) error
- type AMType
- type Config
- type GAEUser
- type GAEUsersAccountManager
- type LoggingData
- type Manager
- type UnixAccountManager
- type UnixUser
- type User
- type UsernameOnlyAccountManager
- type UsernameOnlyUser
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UsernameOnlyLoggingForm ¶
func UsernameOnlyLoggingForm(w http.ResponseWriter, r *http.Request) error
Types ¶
type AMType ¶
type AMType string
const (
GAEAMType AMType = "GCP"
)
const UnixAMType AMType = "unix"
const (
UsernameOnlyAMType AMType = "username-only"
)
type Config ¶
type Config struct { Type AMType OAuth2 appOAuth2.OAuth2Config }
type GAEUsersAccountManager ¶
type GAEUsersAccountManager struct{}
func NewGAEUsersAccountManager ¶
func NewGAEUsersAccountManager() *GAEUsersAccountManager
func (*GAEUsersAccountManager) UserFromRequest ¶
func (g *GAEUsersAccountManager) UserFromRequest(r *http.Request) (User, error)
type LoggingData ¶
type UnixAccountManager ¶
type UnixAccountManager struct {
// contains filtered or unexported fields
}
Implements the Manager interface taking the username from the environment and authorizing all requests
func NewUnixAccountManager ¶
func NewUnixAccountManager() *UnixAccountManager
func (*UnixAccountManager) UserFromRequest ¶
func (m *UnixAccountManager) UserFromRequest(r *http.Request) (User, error)
type UsernameOnlyAccountManager ¶
type UsernameOnlyAccountManager struct{}
Implements the AccountManager interfaces for closed deployed cloud orchestrators. This AccountManager first gets the account information from HTTP cookies, and leverages the RFC 2617 HTTP Basic Authentication if the cookie does not present. Note that only username is used for both cases.
func NewUsernameOnlyAccountManager ¶
func NewUsernameOnlyAccountManager() *UsernameOnlyAccountManager
func (*UsernameOnlyAccountManager) UserFromRequest ¶
func (m *UsernameOnlyAccountManager) UserFromRequest(r *http.Request) (User, error)
type UsernameOnlyUser ¶
type UsernameOnlyUser struct {
// contains filtered or unexported fields
}
func (*UsernameOnlyUser) Email ¶
func (u *UsernameOnlyUser) Email() string
func (*UsernameOnlyUser) Username ¶
func (u *UsernameOnlyUser) Username() string
Click to show internal directories.
Click to hide internal directories.