CrossClj

0.1.2 docs

SourceDocs



RECENT

    friend-authid

    Clojars

    Apr 8, 2014


    OWNER
    Zee Marie
    Zee Designs Inc.
    Las Vegas NV USA

    Readme

    Index of all namespaces


    The README below is fetched from the published project artifact. Some relative links may be broken.

    friend-authid

    Auth-ID workflow for Friend.

    Usage

    (ns example.core
      (:require [cemerick.friend :as friend]
                [friend-authid.core :as authid]))
    
    ;; Sets up an Auth-ID handler at /login. Roles will be turned into keywords
    ;; with :example as the namespace.
    (defn wrap-auth [handler]
      (friend/authenticate
        handler
        {:login-uri "/login"
         :workflows [(authid/workflow
                       :callback-url "http://example.com/login"
                       :credential-fn (partial authid/credential-fn :example)
                       :app-id "YOUR-APP-ID"
                       :secret-key "YOUR-SECRET-KEY")]}))
    
    (def routes ...)
    
    (def app (-> routes wrap-auth ...))
    
    

    License

    Copyright © 2012 ZDI Solutions