Documentation ¶
Index ¶
- type Handler
- func (h *Handler) AddUser(u *User)
- func (h *Handler) ExcludeExtensions()
- func (h *Handler) Login(_ http.ResponseWriter, _ *http.Request, lr *openid2.LoginRequest) (*openid2.LoginResponse, error)
- func (h *Handler) Reset()
- func (h *Handler) ServeHTTP(w http.ResponseWriter, r *http.Request)
- func (h *Handler) SetLoginUser(user string)
- type Suite
- type User
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler is a http.Handler that provides a mock implementation of Ubuntu SSO. It is designed to closely match the responses provided by Ubuntu SSO providing openid login and oauth verification.
func (*Handler) ExcludeExtensions ¶
func (h *Handler) ExcludeExtensions()
ExcludeExtensions prevents an OpenID login response from including any extensions.
func (*Handler) Login ¶
func (h *Handler) Login(_ http.ResponseWriter, _ *http.Request, lr *openid2.LoginRequest) (*openid2.LoginResponse, error)
Login handles OpenID login requests.
func (*Handler) Reset ¶
func (h *Handler) Reset()
Reset sets all of the state in the Handler back to the default. This should be called between tests.
func (*Handler) SetLoginUser ¶
SetLoginUser sets the user that is logged in when an OpenID request is recieved.
type Suite ¶
type Suite struct { MockUSSO *Handler // contains filtered or unexported fields }
func (*Suite) SetUpSuite ¶
func (*Suite) TearDownSuite ¶
func (*Suite) TearDownTest ¶
Click to show internal directories.
Click to hide internal directories.