Documentation
¶
Overview ¶
Package crowdauth provides middleware for Crowd SSO logins
Goals:
- drop-in authentication against Crowd SSO
- make it easy to use Crowd SSO as part of your own auth flow
Index ¶
- func DefaultClientAddressFinder(r *http.Request) (addr string, err error)
- type AuthLoginPage
- type ClientAddressFinder
- type SSO
- func (s *SSO) EndSession(w http.ResponseWriter, r *http.Request)
- func (s *SSO) GetUser(r *http.Request) (u crowd.User, err error)
- func (s *SSO) Handler(h http.Handler) http.Handler
- func (s *SSO) Login(user string, pass string, addr string) (cs crowd.Session, err error)
- func (s *SSO) Logout(w http.ResponseWriter, r *http.Request, newURL string)
- func (s *SSO) StartSession(w http.ResponseWriter, cs crowd.Session)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type AuthLoginPage ¶
The AuthLoginPage type extends the normal http.HandlerFunc type with a boolean return to indicate login success or failure.
type ClientAddressFinder ¶
ClientAddressFinder type represents a function that returns the end-user's IP address, allowing you to handle cases where the address is masked by proxy servers etc by checking headers or whatever to find the user's address
type SSO ¶
type SSO struct { CrowdApp *crowd.Crowd LoginPage AuthLoginPage LoginTemplate *template.Template ClientAddressFinder ClientAddressFinder CookieConfig crowd.CookieConfig }
func (*SSO) EndSession ¶
func (s *SSO) EndSession(w http.ResponseWriter, r *http.Request)
EndSession invalidates the current Crowd session and cookie
func (*SSO) Handler ¶
Handler provides HTTP middleware using http.Handler chaining that requires user authentication via Atlassian Crowd SSO.
func (*SSO) StartSession ¶
func (s *SSO) StartSession(w http.ResponseWriter, cs crowd.Session)
StartSession sets a Crowd session cookie.
Click to show internal directories.
Click to hide internal directories.