intridea/oauth2 — pull request #166 by fancyremarker (2014-02-08 23:34:40+00:00)
Title: Update Assertion strategy to latest specs

The JWT bearer assertion strategy is no longer described by the OAuth 2.0 core spec, as it was in v10 of the draft. Instead, a separate "JSON Web Token (JWT) Profile" [draft](http://tools.ietf.org/html/draft-ietf-oauth-jwt-bearer-07) covers this strategy.

The two significant changes are that `sub` is now used in place of `prn` to refer to the principal subject of the assertion, and the assertion type is now described by two parameters, `grant_type` and `assertion_type`, instead of just `grant_type`.

I also allowed the algorithm to be overridden via `params[:algorithm]`, in case for example `RS512` should be used.