Sha256: 8f8c47ce9b13c52b6d55256df504777dbb073225696ef349a45a8e4d8c8a3f7d

Contents?: true

Size: 460 Bytes

Versions: 28

Compression:

Stored size: 460 Bytes

Contents

class AccessToken < OauthToken
  validates_presence_of :user
  before_create :set_authorized_at
  
  # Implement this to return a hash or array of the capabilities the access token has
  # This is particularly useful if you have implemented user defined permissions.
  # def capabilities
  #   {:invalidate=>"/oauth/invalidate",:capabilities=>"/oauth/capabilities"}
  # end
  
  protected 
  
  def set_authorized_at
    self.authorized_at = Time.now
  end
end

Version data entries

28 entries across 28 versions & 5 rubygems

Version Path
muck-oauth-0.1.0 app/models/access_token.rb
oauth-plugin-0.3.14 generators/oauth_provider/templates/access_token.rb
oauth-plugin-0.3.13 generators/oauth_provider/templates/access_token.rb
oauth-plugin-0.3.12 generators/oauth_provider/templates/access_token.rb
filiptepper-oauth-plugin-0.3.12 generators/oauth_provider/templates/access_token.rb
oauth-plugin-0.3.11 generators/oauth_provider/templates/access_token.rb
oauth-plugin-0.3.9 generators/oauth_provider/templates/access_token.rb
oauth-plugin-0.3.10 generators/oauth_provider/templates/access_token.rb