Skip to content
This repository has been archived by the owner on Mar 8, 2021. It is now read-only.

Commit

Permalink
eliminate "classic" OpenId workflow, gh-45
Browse files Browse the repository at this point in the history
  • Loading branch information
cemerick committed Jan 5, 2017
1 parent 1529fcf commit 608d8a1
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 168 deletions.
12 changes: 1 addition & 11 deletions project.clj
Original file line number Diff line number Diff line change
Expand Up @@ -11,17 +11,7 @@
[org.mindrot/jbcrypt "0.3m"]

;; http-basic
[commons-codec "1.6"]

;; openid
[org.clojure/core.cache "0.6.3"]
[org.openid4java/openid4java-nodeps "0.9.6"
; the openid4java artifact refers to a now-disappeared guice repo that
; was previously hosted via google code svn :X
:exclusions [com.google.code.guice/guice]]
[com.google.inject/guice "2.0"]
[net.sourceforge.nekohtml/nekohtml "1.9.10"]
[org.apache.httpcomponents/httpclient "4.3.5"]]
[commons-codec "1.6"]]

:deploy-repositories {"releases" {:url "https://clojars.org/repo/" :creds :gpg}
"snapshots" {:url "https://clojars.org/repo/" :creds :gpg}}
Expand Down
143 changes: 0 additions & 143 deletions src/cemerick/friend/openid.clj

This file was deleted.

16 changes: 2 additions & 14 deletions test/test_friend/mock_app.clj
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
(ns test-friend.mock-app
(:require [cemerick.friend :as friend]
(cemerick.friend [workflows :as workflows]
[credentials :as creds]
[openid :as openid])
[credentials :as creds])
[cheshire.core :as json]
[robert.hooke :as hooke]
[hiccup.core :as hiccup]
Expand Down Expand Up @@ -47,12 +46,6 @@
(defroutes ^{:private true} mock-app*
;;;;; ANON
(GET "/" request (page-bodies (:uri request)))
;; TODO move openid test into its own ns
(GET "/test-openid" request (hiccup/html [:html
[:form {:action "/openid" :method "POST"}
"OpenId endpoint: "
[:input {:type "text" :name "identifier"}]
[:input {:type "submit" :name "login"}]]]))
(GET "/login" request (page-bodies (:uri request)))
(GET "/free-api" request (api-call 99))
(friend/logout (ANY "/logout" request (resp/redirect "/")))
Expand Down Expand Up @@ -83,9 +76,6 @@
{:response-msg "403 message thrown with unauthorized stone"}
(reset! missles-fired? "shouldn't happen")))

(GET "/view-openid" request
(str "OpenId authentication? " (some-> request friend/identity friend/current-authentication pr-str)))

;; FIN
(route/not-found "404"))

Expand Down Expand Up @@ -121,9 +111,7 @@
:unauthorized-handler #(if-let [msg (-> % ::friend/authorization-failure :response-msg)]
{:status 403 :body msg}
(#'friend/default-unauthorized-handler %))
:workflows [(workflows/interactive-form)
;; TODO move openid test into its own ns
(openid/workflow :credential-fn identity)]})
:workflows [(workflows/interactive-form)]})
handler/site))

(def api-app
Expand Down

0 comments on commit 608d8a1

Please sign in to comment.