Tidied up environment var related code

This commit is contained in:
David J. Allen 2024-05-06 17:25:04 -06:00
parent 2d982d2bb6
commit 198da56791
No known key found for this signature in database
GPG key ID: 717C593FF60A2ACC
4 changed files with 50 additions and 7 deletions

View file

@ -36,10 +36,10 @@ var serveCmd = &cobra.Command{
func init() {
serveCmd.Flags().StringVar(&config.Server.Issuer.Host, "host", "127.0.0.1", "set the identity provider host")
serveCmd.Flags().IntVar(&config.Server.Issuer.Port, "port", 3332, "set the identity provider port")
serveCmd.Flags().StringVar(&endpoints.Authorization, "endpoints.authorization", "", "set the authorization endpoint for the identity provider")
serveCmd.Flags().StringVar(&endpoints.Token, "endpoints.token", "", "set the token endpoint for the identity provider")
serveCmd.Flags().StringVar(&endpoints.JwksUri, "endpoints.jwks_uri", "", "set the JWKS endpoints for the identity provider")
serveCmd.Flags().IntVar(&config.Server.Issuer.Port, "port", config.Server.Issuer.Port, "set the identity provider port")
serveCmd.Flags().StringVar(&endpoints.Authorization, "endpoints.authorization", endpoints.Authorization, "set the authorization endpoint for the identity provider")
serveCmd.Flags().StringVar(&endpoints.Token, "endpoints.token", endpoints.Token, "set the token endpoint for the identity provider")
serveCmd.Flags().StringVar(&endpoints.JwksUri, "endpoints.jwks_uri", endpoints.JwksUri, "set the JWKS endpoints for the identity provider")
rootCmd.AddCommand(serveCmd)
}