Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FetchIDPMetadata ¶
FetchIDPMetadata loads the idp metadata, usually the url is configured in settings
func TemplateProvider ¶
func TemplateProvider(url, name string) templateProvider
TemplateProvider adds a wrapper to the button data that is displayed on the login form
func UpdateSettings ¶
func UpdateSettings(source *types.AppSettings, dest *settings.Settings)
UpdateSettings applies the app settings to the auth specific settings
Types ¶
type IdpIdentityPayload ¶
type SamlSPArgs ¶
type SamlSPArgs struct { Enabled bool AcsURL string MetaURL string SloURL string SignRequests bool SignatureMethod string Binding string // user meta from idp IdentityPayload IdpIdentityPayload IdpURL url.URL Host url.URL Certificate *x509.Certificate PrivateKey *rsa.PrivateKey IdpMeta *saml.EntityDescriptor }
type SamlSPService ¶
type SamlSPService struct { Enabled bool IdpURL url.URL Host url.URL IDPUserMeta *IdpIdentityPayload IDPMeta *saml.EntityDescriptor // contains filtered or unexported fields }
func NewSamlSPService ¶
func NewSamlSPService(log *zap.Logger, args SamlSPArgs) (s *SamlSPService, err error)
NewSamlSPService loads the certificates and registers the already fetched IDP metadata into the SAML middleware
func (*SamlSPService) GuessIdentifier ¶
func (ssp *SamlSPService) GuessIdentifier(payload map[string][]string) string
GuessIdentifier tries to guess the necessary (email) key for external authentication
func (*SamlSPService) Handler ¶
func (ssp *SamlSPService) Handler() *samlsp.Middleware
func (*SamlSPService) NameIdentifier ¶
func (ssp *SamlSPService) NameIdentifier() string
func (*SamlSPService) ServeHTTP ¶
func (ssp *SamlSPService) ServeHTTP(w http.ResponseWriter, r *http.Request)
ServeHTTP enables us to use the service directly in the router
Click to show internal directories.
Click to hide internal directories.