]> git.openstreetmap.org Git - rails.git/blobdiff - vendor/plugins/oauth-plugin/generators/oauth_provider/templates/access_token.rb
Adding initial version of the OAuth token authentication method. This adds basic...
[rails.git] / vendor / plugins / oauth-plugin / generators / oauth_provider / templates / access_token.rb
diff --git a/vendor/plugins/oauth-plugin/generators/oauth_provider/templates/access_token.rb b/vendor/plugins/oauth-plugin/generators/oauth_provider/templates/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