Skip to content

Commit

Permalink
Merge pull request #8 from brockgr/patch-1
Browse files Browse the repository at this point in the history
Updated AccessGrant so timeout now matches AuthController's access_tokens
  • Loading branch information
gautamrege committed Feb 7, 2012
2 parents e94188a + adc6b7d commit 1be89b8
Showing 1 changed file with 2 additions and 4 deletions.
6 changes: 2 additions & 4 deletions app/models/access_grant.rb
Original file line number Diff line number Diff line change
Expand Up @@ -24,10 +24,8 @@ def redirect_uri_for(redirect_uri)
end
end

# Note: This is currently hard coded to 2 days, but it could be configurable
# per-user-type or per-application.
# No need for this to be constant like this.
# Note: This is currently configured through devise, and matches the AuthController access token life
def start_expiry_period!
self.update_attribute(:access_token_expires_at, 2.days.from_now)
self.update_attribute(:access_token_expires_at, Time.now + Devise.timeout_in)
end
end

0 comments on commit 1be89b8

Please sign in to comment.