Documentation
¶
Index ¶
- Constants
- func GetPath(r *http.Request, ingresses *ingress.Ingresses) string
- type ReverseProxy
- type ReverseProxySource
- type SSOProxy
- func (s *SSOProxy) GetAcrHandler() *acr.Handler
- func (s *SSOProxy) GetAutoLogin() *autologin.AutoLogin
- func (s *SSOProxy) GetIngresses() *ingress.Ingresses
- func (s *SSOProxy) GetPath(r *http.Request) string
- func (s *SSOProxy) GetSSOServerURL() *urllib.URL
- func (s *SSOProxy) GetSession(r *http.Request) (*session.Session, error)
- func (s *SSOProxy) Login(w http.ResponseWriter, r *http.Request)
- func (s *SSOProxy) LoginCallback(w http.ResponseWriter, r *http.Request)
- func (s *SSOProxy) Logout(w http.ResponseWriter, r *http.Request)
- func (s *SSOProxy) LogoutCallback(w http.ResponseWriter, r *http.Request)
- func (s *SSOProxy) LogoutFrontChannel(w http.ResponseWriter, r *http.Request)
- func (s *SSOProxy) LogoutLocal(w http.ResponseWriter, r *http.Request)
- func (s *SSOProxy) Session(w http.ResponseWriter, r *http.Request)
- func (s *SSOProxy) SessionForwardAuth(w http.ResponseWriter, r *http.Request)
- func (s *SSOProxy) SessionRefresh(w http.ResponseWriter, r *http.Request)
- func (s *SSOProxy) Wildcard(w http.ResponseWriter, r *http.Request)
- type SSOServer
- type Standalone
- func (s *Standalone) BadRequest(w http.ResponseWriter, r *http.Request, cause error)
- func (s *Standalone) GetAcrHandler() *acr.Handler
- func (s *Standalone) GetAutoLogin() *autologin.AutoLogin
- func (s *Standalone) GetCookieOptions(r *http.Request) cookie.Options
- func (s *Standalone) GetIngresses() *ingress.Ingresses
- func (s *Standalone) GetPath(r *http.Request) string
- func (s *Standalone) GetSession(r *http.Request) (*session.Session, error)
- func (s *Standalone) InternalError(w http.ResponseWriter, r *http.Request, cause error)
- func (s *Standalone) Login(w http.ResponseWriter, r *http.Request)
- func (s *Standalone) LoginCallback(w http.ResponseWriter, r *http.Request)
- func (s *Standalone) Logout(w http.ResponseWriter, r *http.Request)
- func (s *Standalone) LogoutCallback(w http.ResponseWriter, r *http.Request)
- func (s *Standalone) LogoutFrontChannel(w http.ResponseWriter, r *http.Request)
- func (s *Standalone) LogoutLocal(w http.ResponseWriter, r *http.Request)
- func (s *Standalone) Retry(r *http.Request, loginCookie *openid.LoginCookie) string
- func (s *Standalone) Session(w http.ResponseWriter, r *http.Request)
- func (s *Standalone) SessionForwardAuth(w http.ResponseWriter, r *http.Request)
- func (s *Standalone) SessionRefresh(w http.ResponseWriter, r *http.Request)
- func (s *Standalone) TooManyRequests(w http.ResponseWriter, r *http.Request, cause error)
- func (s *Standalone) Unauthorized(w http.ResponseWriter, r *http.Request, cause error)
- func (s *Standalone) Wildcard(w http.ResponseWriter, r *http.Request)
Constants ¶
View Source
const (
// MaxAutoRetryAttempts is the maximum number of times to automatically redirect the user to retry their original request.
MaxAutoRetryAttempts = 3
)
Variables ¶
This section is empty.
Functions ¶
Types ¶
type ReverseProxy ¶
type ReverseProxy struct { *httputil.ReverseProxy EnableAccessLogs bool IncludeIdToken bool }
func NewReverseProxy ¶
func NewReverseProxy(upstream *urllib.URL, preserveInboundHostHeader bool) *ReverseProxy
func NewUpstreamProxy ¶
func NewUpstreamProxy(upstream *urllib.URL, enableAccessLogs bool, includeIdToken bool) *ReverseProxy
func (*ReverseProxy) Handler ¶
func (rp *ReverseProxy) Handler(src ReverseProxySource, w http.ResponseWriter, r *http.Request)
type ReverseProxySource ¶
type SSOProxy ¶
type SSOProxy struct { AcrHandler *acr.Handler AutoLogin *autologin.AutoLogin Config *config.Config Ingresses *ingress.Ingresses Redirect url.Redirect SSOServerURL *urllib.URL SSOServerReverseProxy *ReverseProxy SessionReader session.Reader UpstreamProxy *ReverseProxy }
func (*SSOProxy) GetAcrHandler ¶
func (*SSOProxy) GetAutoLogin ¶
func (*SSOProxy) GetIngresses ¶
func (*SSOProxy) GetSSOServerURL ¶
func (*SSOProxy) GetSession ¶
func (*SSOProxy) LoginCallback ¶
func (s *SSOProxy) LoginCallback(w http.ResponseWriter, r *http.Request)
func (*SSOProxy) LogoutCallback ¶
func (s *SSOProxy) LogoutCallback(w http.ResponseWriter, r *http.Request)
func (*SSOProxy) LogoutFrontChannel ¶
func (s *SSOProxy) LogoutFrontChannel(w http.ResponseWriter, r *http.Request)
func (*SSOProxy) LogoutLocal ¶
func (s *SSOProxy) LogoutLocal(w http.ResponseWriter, r *http.Request)
func (*SSOProxy) SessionForwardAuth ¶
func (s *SSOProxy) SessionForwardAuth(w http.ResponseWriter, r *http.Request)
func (*SSOProxy) SessionRefresh ¶
func (s *SSOProxy) SessionRefresh(w http.ResponseWriter, r *http.Request)
type SSOServer ¶
type SSOServer struct {
*Standalone
}
func NewSSOServer ¶
func NewSSOServer(cfg *config.Config, handler *Standalone) (*SSOServer, error)
func (*SSOServer) LogoutFrontChannel ¶
func (s *SSOServer) LogoutFrontChannel(w http.ResponseWriter, r *http.Request)
func (*SSOServer) LogoutLocal ¶
func (s *SSOServer) LogoutLocal(w http.ResponseWriter, r *http.Request)
type Standalone ¶
type Standalone struct { AcrHandler *acr.Handler AutoLogin *autologin.AutoLogin Client *openidclient.Client Config *config.Config CookieOptions cookie.Options Crypter crypto.Crypter Ingresses *ingress.Ingresses Redirect url.Redirect SessionManager session.Manager UpstreamProxy *ReverseProxy }
func NewStandalone ¶
func NewStandalone( cfg *config.Config, jwksProvider openidclient.JwksProvider, openidConfig openidconfig.Config, crypter crypto.Crypter, ) (*Standalone, error)
func (*Standalone) BadRequest ¶
func (s *Standalone) BadRequest(w http.ResponseWriter, r *http.Request, cause error)
func (*Standalone) GetAcrHandler ¶
func (s *Standalone) GetAcrHandler() *acr.Handler
func (*Standalone) GetAutoLogin ¶
func (s *Standalone) GetAutoLogin() *autologin.AutoLogin
func (*Standalone) GetCookieOptions ¶
func (s *Standalone) GetCookieOptions(r *http.Request) cookie.Options
func (*Standalone) GetIngresses ¶
func (s *Standalone) GetIngresses() *ingress.Ingresses
func (*Standalone) GetSession ¶
func (*Standalone) InternalError ¶
func (s *Standalone) InternalError(w http.ResponseWriter, r *http.Request, cause error)
func (*Standalone) Login ¶
func (s *Standalone) Login(w http.ResponseWriter, r *http.Request)
func (*Standalone) LoginCallback ¶
func (s *Standalone) LoginCallback(w http.ResponseWriter, r *http.Request)
func (*Standalone) Logout ¶
func (s *Standalone) Logout(w http.ResponseWriter, r *http.Request)
func (*Standalone) LogoutCallback ¶
func (s *Standalone) LogoutCallback(w http.ResponseWriter, r *http.Request)
func (*Standalone) LogoutFrontChannel ¶
func (s *Standalone) LogoutFrontChannel(w http.ResponseWriter, r *http.Request)
func (*Standalone) LogoutLocal ¶
func (s *Standalone) LogoutLocal(w http.ResponseWriter, r *http.Request)
func (*Standalone) Retry ¶
func (s *Standalone) Retry(r *http.Request, loginCookie *openid.LoginCookie) string
Retry returns a URI that should retry the desired route that failed. It only handles the routes exposed by Wonderwall, i.e. `/oauth2/*`. As these routes are related to the authentication flow, we default to redirecting back to the handled `/oauth2/login` endpoint unless the original request attempted to reach the logout-flow.
func (*Standalone) Session ¶
func (s *Standalone) Session(w http.ResponseWriter, r *http.Request)
func (*Standalone) SessionForwardAuth ¶
func (s *Standalone) SessionForwardAuth(w http.ResponseWriter, r *http.Request)
func (*Standalone) SessionRefresh ¶
func (s *Standalone) SessionRefresh(w http.ResponseWriter, r *http.Request)
func (*Standalone) TooManyRequests ¶
func (s *Standalone) TooManyRequests(w http.ResponseWriter, r *http.Request, cause error)
func (*Standalone) Unauthorized ¶
func (s *Standalone) Unauthorized(w http.ResponseWriter, r *http.Request, cause error)
func (*Standalone) Wildcard ¶
func (s *Standalone) Wildcard(w http.ResponseWriter, r *http.Request)
Wildcard proxies all requests to an upstream server.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.