OpenID Implementation #194

Open
wants to merge 19 commits into
from
Commits on Dec 13, 2011
  1. @chrismgray

    Minimal OpenID support.

    chrismgray committed Dec 13, 2011
    This doesn't actually add the user to the database yet, but it does
    validate that the user's OpenID is good.
  2. @chrismgray

    More refined success and failure states.

    chrismgray committed Dec 13, 2011
    Success on receiving an OpenID now mimics the behavior of receiving a
    valid username and password.
  3. @chrismgray

    Allow people with current accounts to associate an OpenID

    chrismgray committed Dec 13, 2011
    This is a rather large update that allows users with existing accounts
    to associate an OpenID with their current account.  When a user logs
    in, the :user returned by session/get-session is now a map, but this
    is made backwards-compatible by most of the utility functions
    accepting either a string or a map.
  4. @chrismgray
  5. @chrismgray

    Fixed some bugs related to user-attribute confusion

    chrismgray committed Dec 13, 2011
    (user-attribute :foo) does not return a map, it just returns the attribute.
  6. @chrismgray

    URLEncode and URLDecode openids

    chrismgray committed Dec 13, 2011
    If the user only has an OpenID, then we need to URLEncode the link to
    his or her profile page
  7. @chrismgray

    Simplify mark-completed

    chrismgray committed Dec 13, 2011
    mark-completed is never called with the optional user variable, so I
    got rid of it
  8. @chrismgray
  9. @chrismgray
  10. @chrismgray
Commits on Dec 14, 2011
  1. @chrismgray
  2. @chrismgray
  3. @chrismgray
  4. @chrismgray

    New function user-or-openid.

    chrismgray committed Dec 14, 2011
    Factors out #(or (:user %) (:openid %)) pattern.
  5. @chrismgray

    Don't map over one element

    chrismgray committed Dec 14, 2011
  6. @chrismgray
  7. @chrismgray
  8. @chrismgray

    Refactored get-user and user-attribute

    chrismgray committed Dec 14, 2011
    Put the cond inside the where clause of the database fetch.  The one
    thing I don't like about this is that if these functions are passed an
    invalid object (such as a map without :user or :openid), then we will
    have a situation where we do (fetch-one :users :where nil), which will
    incorrectly return a result.  Perhaps we should add an :else to these
    conds which looks for something we know not to be in the database.
  9. @chrismgray