]> git.openstreetmap.org Git - rails.git/blobdiff - app/models/access_token.rb
Adding initial version of the OAuth token authentication method. This adds basic...
[rails.git] / app / models / access_token.rb
diff --git a/app/models/access_token.rb b/app/models/access_token.rb
new file mode 100644 (file)
index 0000000..b773310
--- /dev/null
@@ -0,0 +1,10 @@
+class AccessToken<OauthToken
+  validates_presence_of :user
+  before_create :set_authorized_at
+  
+protected 
+  
+  def set_authorized_at
+    self.authorized_at = Time.now
+  end
+end
\ No newline at end of file