lib/rack/oauth2/server/errors.rb in rack-oauth2-server-2.0.0.beta4 vs lib/rack/oauth2/server/errors.rb in rack-oauth2-server-2.0.0.beta5
- old
+ new
@@ -40,11 +40,11 @@
# The provided access grant is invalid, expired, or revoked (e.g. invalid
# assertion, expired authorization token, bad end-user password credentials,
# or mismatching authorization code and redirection URI).
class InvalidGrantError < OAuthError
- def initialize
- super :invalid_grant, "This access grant is no longer valid."
+ def initialize(message)
+ super :invalid_grant, message || "This access grant is no longer valid."
end
end
# Invalid_request, the request is missing a required parameter, includes an
# unsupported parameter or parameter value, repeats the same parameter, uses