Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated AccessGrant so timeout now matches AuthController's access_tokens #8

Merged
merged 1 commit into from
Feb 7, 2012
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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