intridea/oauth2 — pull request #191 by davestevens (2014-09-07 20:59:40+00:00)
Title: Token is expired if 'expired_at' time is now.

The `expired?` method on `AccessToken` does not take into account the current time. If `expires_at` is right now `expired?` currently returns `false`. Is there a reason for this?
It means I can not catch a token refresh without using a `rescue` for `OAuth2::Error` after my request then then refreshing the token (which may not always be the cause of the error.

Example code of issue:
```ruby
require "oauth2"

# Rails app using Doorkeeper with `access_token_expires_in` set to `2.seconds`
client_id = "abc"
client_secret = "def"
endpoint = "https://api.example.com"

client = OAuth2::Client.new(client_id, client_secret, site: endpoint)
token = client.password.get_token("username", "password")
puts token.get("/version").body

# Sleep until the Token is expired
sleep token.expires_at - Time.new.to_i
# Expect this returns false
puts token.expired? # Prints true
token = token.refresh! if token.expired?

# This request fails due to expired Token
puts token.get("/version").body
```