0.2.30.2.2wrap-authorize now requires its role parameter to be non-empty (gh-99)robert-hooke is now properly classified as a test dependency (gh-106)There are other changes, please see the full list of issues resolved leading up to this release, and the commit history if you're super-interested.
0.2.1:cemerick.friend/ensure-session as an optional slot workflows can add
to the metadata on authentication maps they return. By default, Friend will
update (or set anew) the Ring session when a user is authenticated,
redirecting them to where they were originally headed before hitting an
authentication requirement. By setting :cemerick.friend/ensure-session and
:cemerick.friend/redirect-on-auth? to false, the user will not be
redirected, and the session will not be set. This addresses the use cases of
both the HTTP Basic workflow, as well as use cases where a request is made
simply to establish authentication without a redirect, but while retaining the
session-setting behaviour. (gh-83)Authorization HTTP header can be used (gh-85)X-Forwarded-Proto is present in the
original request (gh-84)0.2.0Friend now depends upon Ring 1.2.0 final. This means (due to the transitive dependency on tools.reader) that Friend now requires Clojure 1.3.0+.
This release contains a significant refactoring of the library to follow the interceptor pattern adopted by Ring 1.2.0 (see the note under "Misc" below). Note that this refactoring is not a breaking change, either from an end-user or workflow author/maintainer standpoint.
Core API
default-unauthenticated-handler now properly retains the query string of
the initial requested unauthenticated URL (gh-68)Workflows
return_to URL now automatically takes into account any
x-forwarded-proto header provided by your reverse proxyx-forwarded-proto headers, then
you can use middleware to add an appropriate return_to URL to the request
going into the OpenID middleware, keyed under
:cemerick.friend.openid/return-url (gh-74)username parameter value
after a failed login attempt (gh-69)Misc
0.1.5Friend is now tracking Ring v1.2.0 betas, minimally requiring
[ring/ring-core "1.2.0-beta1"].
Core API
:roles in authentication maps may now optionally be a function returning a
collection of roles (gh-21, gh-55)Workflows
0.1.4Core API
authorize (gh-46)Misc
0.1.3Core API
cemerick.friend/current-authentication can now accept either a ring request
map or a Friend identity mapcemerick.friend/authenticated can now accept more than one body form
(gh-32)cemerick.friend/authenticate option, :unauthenticated-handler,
allows one to provide a separate Ring handler to control how to respond to
unauthenticated requests when authentication is required (either via setting
:allow-anon to false, or via use of cemerick.friend/authenticated). The
prior behaviour (redirecting to the URI specified by :login-uri) is currently
retained by the default :unauthenticated-handler,
cemerick.friend/default-unauthenticated-handler. (gh-38)Workflows
http-basic workflow no longer produces a 401 Unauthorized response when
no HTTP Basic credentials are supplied. (gh-38):consumer-manager option for providing a
fully-configured org.openid4java.consumer.ConsumerManager (to be used
instead of the in-memory default) (gh-35)Misc
cemerick.friend.credentials/bcrypt-verify now available to
verify bcrypt-hashed strings outside of
cemerick.friend.credentials/bcrypt-credential-fn and the
workflow/authentication processLocation header per the HTTP spec (gh-42)0.1.2Core API
:cemerick.friend.credentials/password-key slot in their metadata to
indicate the key within the credential map itself which holds the password.:cemerick.friend/redirect-on-auth? key in workflow may now
be a string URI to which the user will be redirected (instead of the
:default-landing-uri provided to the authenticate middleware).Workflows
http-basic workflow now properly supports empty usernames and passwords
(gh-28)0.1.1Bricked, don't use.
0.1.0Core API
:login-uri now actually defaults to "/login" as indicated in
documentation (Yoshito Komatsu, gh-13):unauthorized-redirect-uri is no longer used (was nonsensical)cemerick.friend/authorize, cemerick.friend/authenticated,
and throw-authorized)cemerick.friend/throw-authorized is now
added to the request passed to :unauthorized-handler in the
:cemerick.friend/authorization-failure slotcemerick.friend/logout* is now public (John Szakmeister)Workflows
:allow-anon? is false (gh-16):max-nonce-age must now be specified in milliseconds
instead of secondsMisc
cemerick.friend/identity fixedCan you improve this documentation? These fine people already did:
Chas Emerick & Gabriel HornerEdit on GitHub
cljdoc builds & hosts documentation for Clojure/Script libraries
| Ctrl+k | Jump to recent docs |
| ← | Move to previous article |
| → | Move to next article |
| Ctrl+/ | Jump to the search field |