Documentation
¶
Index ¶
- Variables
- func ConfigureLoginFinishRoute(route httproute.Route) httproute.Route
- func ConfigureLoginRoute(route httproute.Route) httproute.Route
- func ConfigureLogoutRoute(route httproute.Route) httproute.Route
- func ConfigureMetadataRoute(route httproute.Route) httproute.Route
- type BindingHTTPPostWriter
- type BindingHTTPRedirectWriter
- type Endpoints
- type HandlerSAMLService
- type LoginFinishHandler
- type LoginHandler
- type LoginResultHandler
- type LogoutHandler
- type MetadataHandler
- type SAMLAuthenticationInfoResolver
- type SAMLAuthenticationInfoService
- type SAMLErrorResult
- type SAMLSLOService
- type SAMLSLOSessionService
- type SAMLSessionService
- type SAMLUIService
- type SAMLUserFacade
- type SessionManager
Constants ¶
This section is empty.
Variables ¶
View Source
var DependencySet = wire.NewSet( wire.Struct(new(LoginResultHandler), "*"), wire.Struct(new(MetadataHandler), "*"), wire.Struct(new(LoginHandler), "*"), wire.Struct(new(LoginFinishHandler), "*"), wire.Struct(new(LogoutHandler), "*"), )
View Source
var LoginFinishHandlerLogger = slogutil.NewLogger("saml-login-finish-handler")
View Source
var LoginHandlerLogger = slogutil.NewLogger("saml-login-handler")
View Source
var LogoutHandlerLogger = slogutil.NewLogger("saml-logout-handler")
Functions ¶
Types ¶
type BindingHTTPPostWriter ¶
type BindingHTTPPostWriter interface {
WriteResponse(
rw http.ResponseWriter,
r *http.Request,
callbackURL string,
responseElement *etree.Element,
relayState string) error
WriteRequest(
rw http.ResponseWriter,
r *http.Request,
callbackURL string,
requestElement *etree.Element,
relayState string) error
}
type BindingHTTPRedirectWriter ¶
type BindingHTTPRedirectWriter interface {
WriteResponse(
rw http.ResponseWriter,
r *http.Request,
callbackURL string,
responseElement *etree.Element,
relayState string) error
WriteRequest(
rw http.ResponseWriter,
r *http.Request,
callbackURL string,
requestElement *etree.Element,
relayState string) error
}
type HandlerSAMLService ¶
type HandlerSAMLService interface {
IdpEntityID() string
IdpMetadata(serviceProviderId string) (*samlprotocol.Metadata, error)
ValidateAuthnRequest(serviceProviderId string, authnRequest *samlprotocol.AuthnRequest) error
IssueLoginSuccessResponse(
ctx context.Context,
callbackURL string,
serviceProviderId string,
authInfo authenticationinfo.T,
inResponseToAuthnRequest *samlprotocol.AuthnRequest,
) (*samlprotocol.Response, error)
VerifyEmbeddedSignature(
sp *config.SAMLServiceProviderConfig,
samlRequestXML string) error
VerifyExternalSignature(
sp *config.SAMLServiceProviderConfig,
element *saml.SAMLElementSigned,
sigAlg string,
relayState string,
signature string) error
IssueLogoutResponse(
callbackURL string,
inResponseToLogoutRequest *samlprotocol.LogoutRequest,
isPartialLogout bool,
) (*samlprotocol.LogoutResponse, error)
IssueLogoutRequest(
ctx context.Context,
sp *config.SAMLServiceProviderConfig,
sloSession *samlslosession.SAMLSLOSession,
) (*samlprotocol.LogoutRequest, error)
}
type LoginFinishHandler ¶
type LoginFinishHandler struct {
Clock clock.Clock
SAMLService HandlerSAMLService
SAMLSessionService SAMLSessionService
AuthenticationInfoResolver SAMLAuthenticationInfoResolver
AuthenticationInfoService SAMLAuthenticationInfoService
LoginResultHandler LoginResultHandler
BindingHTTPPostWriter BindingHTTPPostWriter
}
func (*LoginFinishHandler) ServeHTTP ¶
func (h *LoginFinishHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type LoginHandler ¶
type LoginHandler struct {
Clock clock.Clock
Database *appdb.Handle
SAMLConfig *config.SAMLConfig
SAMLService HandlerSAMLService
SAMLSessionService SAMLSessionService
SAMLUIService SAMLUIService
UserFacade SAMLUserFacade
LoginResultHandler LoginResultHandler
BindingHTTPPostWriter BindingHTTPPostWriter
}
func (*LoginHandler) ServeHTTP ¶
func (h *LoginHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type LoginResultHandler ¶
type LoginResultHandler struct {
Clock clock.Clock
Database *appdb.Handle
SAMLService HandlerSAMLService
}
type LogoutHandler ¶
type LogoutHandler struct {
Clock clock.Clock
Database *appdb.Handle
SAMLConfig *config.SAMLConfig
SAMLService HandlerSAMLService
SessionManager SessionManager
SAMLSLOSessionService SAMLSLOSessionService
SAMLSLOService SAMLSLOService
Endpoints Endpoints
BindingHTTPPostWriter BindingHTTPPostWriter
BindingHTTPRedirectWriter BindingHTTPRedirectWriter
}
func (*LogoutHandler) ServeHTTP ¶
func (h *LogoutHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type MetadataHandler ¶
type MetadataHandler struct {
SAMLService HandlerSAMLService
}
func (*MetadataHandler) ServeHTTP ¶
func (h *MetadataHandler) ServeHTTP(rw http.ResponseWriter, r *http.Request)
type SAMLErrorResult ¶
type SAMLErrorResult struct {
Response samlprotocol.Respondable
Cause error
}
func NewSAMLErrorResult ¶
func NewSAMLErrorResult(cause error, response samlprotocol.Respondable) *SAMLErrorResult
func (*SAMLErrorResult) Error ¶
func (s *SAMLErrorResult) Error() string
func (*SAMLErrorResult) Unwrap ¶
func (s *SAMLErrorResult) Unwrap() error
type SAMLSLOService ¶
type SAMLSLOService interface {
SendSLORequest(
ctx context.Context,
rw http.ResponseWriter,
r *http.Request,
sloSession *samlslosession.SAMLSLOSession,
sp *config.SAMLServiceProviderConfig,
) error
}
type SAMLSLOSessionService ¶
type SAMLSLOSessionService interface {
Get(ctx context.Context, sessionID string) (entry *samlslosession.SAMLSLOSession, err error)
Save(ctx context.Context, session *samlslosession.SAMLSLOSession) (err error)
}
type SAMLSessionService ¶
type SAMLSessionService interface {
Save(ctx context.Context, entry *samlsession.SAMLSession) (err error)
Get(ctx context.Context, entryID string) (*samlsession.SAMLSession, error)
Delete(ctx context.Context, entryID string) error
}
type SAMLUIService ¶
type SAMLUIService interface {
ResolveUIInfo(
sp *config.SAMLServiceProviderConfig,
entry *samlsession.SAMLSessionEntry,
) (info *samlsession.SAMLUIInfo, showUI bool, err error)
BuildAuthenticationURL(s *samlsession.SAMLSession) (*url.URL, error)
}
type SAMLUserFacade ¶
type SessionManager ¶
type SessionManager interface {
Get(ctx context.Context, id string) (session.ListableSession, error)
Logout(ctx context.Context, sessionBase session.SessionBase, w http.ResponseWriter) ([]session.ListableSession, error)
}
Click to show internal directories.
Click to hide internal directories.