cemerick / friend

An extensible authentication and authorization library for Clojure Ring web applications and services.
1.16k stars 122 forks source link

redirect-new-auth redirects to http instead of https when behind a proxy #131

Open timothypratley opened 9 years ago

timothypratley commented 9 years ago

Fortunately I am able to avoid this behavior by setting the flag to be false in the auth meta-data...

It seems unnecessary to use the entire context: (str (:context request) (-> request ::auth-config :default-landing-uri ))

cemerick commented 9 years ago

Do you mean redirect-new-auth? redirect-on-auth is an optional metadata key on credential maps.

timothypratley commented 9 years ago

yes :smiley:

cemerick commented 9 years ago

OK, I see what you mean. I think the context is required insofar as the :default-landing-uri is going to be (or should be?) defined in terms of it.

In any case, I guess we should apply all the same measures used in requires-scheme-with-proxy to translate the resulting URL to use the appropriate scheme, etc. PR welcome.