Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var RootCmd = &cobra.Command{ Use: "lite-idp", Short: "SAML 2 Identity Provider", RunE: func(cmd *cobra.Command, args []string) error { stop := make(chan os.Signal, 1) signal.Notify(stop, os.Interrupt) idp := &idp.IDP{} handler, err := idp.Handler() if err != nil { return err } server := &http.Server{ TLSConfig: idp.TLSConfig, Handler: handlers.CombinedLoggingHandler(os.Stdout, hsts(handler)), Addr: viper.GetString("listen-address"), } go func() { <-stop server.Shutdown(context.Background()) }() log.Infof("listening for connections on %s", server.Addr) if err = server.ListenAndServeTLS("", ""); err != http.ErrServerClosed { return err } log.Info("server shutdown cleanly") return nil }, }
RootCmd represents the base command when called without any subcommands
Functions ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.