Class: OpenidCouchdbStore::Association

Inherits:
CouchRest::ExtendedDocument
  • Object
show all
Defined in:
lib/openid_couchdb_store.rb

Class Method Summary collapse

Instance Method Summary collapse

Class Method Details

.by_server_url_and_handle(server, handle) ⇒ Object



22
23
24
# File 'lib/openid_couchdb_store.rb', line 22

def self.by_server_url_and_handle(server, handle)
  by_server_url_plus_handle(:key => "#{server}&#{handle}")
end

.expiredObject



26
27
28
# File 'lib/openid_couchdb_store.rb', line 26

def self.expired
  by_expires_at(:endkey => Time.now.to_i)
end

Instance Method Details

#generate_expires_atObject



30
31
32
# File 'lib/openid_couchdb_store.rb', line 30

def generate_expires_at
  self['expires_at'] = self['issued'] + self['lifetime']
end