Skip to content

Commit

Permalink
cmd: Improve issuer error message
Browse files Browse the repository at this point in the history
Closes #1133

Signed-off-by: aeneasr <aeneas@ory.sh>
  • Loading branch information
aeneasr committed Nov 3, 2018
1 parent 2ff6561 commit 1c8ee57
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion cmd/serve.go
Expand Up @@ -99,7 +99,7 @@ OAUTH2 CONTROLS
of ORY Hydra.
Example: OAUTH2_LOGOUT_REDIRECT_URL=https://myapp.com/
- OAUTH2_ISSUER_URL: IssuerURL is the public URL of your Hydra installation. It is used for OAuth2 and OpenID Connect and must be
- OAUTH2_ISSUER_URL: This is the public URL of your ORY Hydra installation. It is used for OAuth2 and OpenID Connect and must be
specified and using HTTPS protocol, unless --dangerous-force-http is set.
Example: OAUTH2_ISSUER_URL=https://hydra.myapp.com/
Expand Down
4 changes: 2 additions & 2 deletions cmd/server/handler.go
Expand Up @@ -140,12 +140,12 @@ func setup(c *config.Config, cmd *cobra.Command, args []string, name string) (ha

if !c.ForceHTTP {
if c.Issuer == "" {
logger.Fatalln("IssuerURL must be explicitly specified unless --dangerous-force-http is passed. To find out more, use `hydra help serve`.")
logger.Fatalln("OAUTH2_ISSUER_URL must be explicitly specified unless --dangerous-force-http is passed. To find out more, use `hydra help serve`.")
}
issuer, err := url.Parse(c.Issuer)
cmdx.Must(err, "Could not parse issuer URL: %s", err)
if issuer.Scheme != "https" {
logger.Fatalln("IssuerURL must use HTTPS unless --dangerous-force-http is passed. To find out more, use `hydra help serve`.")
logger.Fatalln("OAUTH2_ISSUER_URL must use HTTPS unless --dangerous-force-http is passed. To find out more, use `hydra help serve`.")
}
}

Expand Down

0 comments on commit 1c8ee57

Please sign in to comment.