Sha256: ef6632cec55630b867096cc143ce96396400252b1c8d1288cbff7a01ff8782ad
Contents?: true
Size: 508 Bytes
Versions: 10
Compression:
Stored size: 508 Bytes
Contents
class Oauth2Verifier < OauthToken validates_presence_of :user def exchange!(params={}) OauthToken.transaction do token = Oauth2Token.create! :user=>user,:client_application=>client_application invalidate! token end end def code token end def redirect_url callback_url end protected def generate_keys self.token = OAuth::Helper.generate_key(20)[0,20] self.valid_to = 10.minutes.from_now self.authorized_at = Time.now end end
Version data entries
10 entries across 10 versions & 3 rubygems