Sha256: 2213df6c7b090178a533856b81f3f315b93c74aae6685f228e7ce165e6ce11b8

Contents?: true

Size: 463 Bytes

Versions: 45

Compression:

Stored size: 463 Bytes

Contents

class AccessToken < OauthToken
  validates_presence_of :user, :secret
  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

45 entries across 19 versions & 6 rubygems

Version Path
houston-oauth-plugin-0.5.1 generators/oauth_provider/templates/access_token.rb
houston-oauth-plugin-0.5.1 lib/generators/active_record/oauth_provider_templates/access_token.rb
houston-oauth-plugin-0.5.1 lib/generators/mongoid/oauth_provider_templates/access_token.rb
panjiva-oauth-plugin-0.4.1 lib/generators/active_record/oauth_provider_templates/access_token.rb
panjiva-oauth-plugin-0.4.1 lib/generators/mongoid/oauth_provider_templates/access_token.rb
panjiva-oauth-plugin-0.4.1 generators/oauth_provider/templates/access_token.rb
oauth-plugin-0.5.1 lib/generators/mongoid/oauth_provider_templates/access_token.rb
oauth-plugin-0.5.1 generators/oauth_provider/templates/access_token.rb
oauth-plugin-0.5.1 lib/generators/active_record/oauth_provider_templates/access_token.rb
oauth-plugin-0.5.0 generators/oauth_provider/templates/access_token.rb
oauth-plugin-0.5.0 lib/generators/active_record/oauth_provider_templates/access_token.rb
oauth-plugin-0.5.0 lib/generators/mongoid/oauth_provider_templates/access_token.rb
oauth-provider-0.5.0rc1 generators/oauth_provider/templates/access_token.rb
oauth-provider-0.5.0rc1 lib/generators/active_record/oauth_provider_templates/access_token.rb
oauth-provider-0.5.0rc1 lib/generators/mongoid/oauth_provider_templates/access_token.rb
oauth-plugin-0.4.1 generators/oauth_provider/templates/access_token.rb
oauth-plugin-0.4.1 lib/generators/active_record/oauth_provider_templates/access_token.rb
oauth-plugin-0.4.1 lib/generators/mongoid/oauth_provider_templates/access_token.rb
oauth-plugin-0.4.0 lib/generators/mongoid/oauth_provider_templates/access_token.rb
oauth-plugin-0.4.0 generators/oauth_provider/templates/access_token.rb