summaryrefslogtreecommitdiff
path: root/app/models/oauth_access_token.rb
diff options
context:
space:
mode:
authorStan Hu <stanhu@gmail.com>2016-04-12 22:39:18 -0700
committerStan Hu <stanhu@gmail.com>2016-04-14 07:24:58 -0700
commitc7e384aab23301ad0ee3559252324fa957d15db3 (patch)
treed78a59ec9a9da680dcc93508c92a09885069dd7c /app/models/oauth_access_token.rb
parent0c082d5e3a34d787f8b2fea0c22fa4256cf82be3 (diff)
downloadgitlab-ce-c7e384aab23301ad0ee3559252324fa957d15db3.tar.gz
Add spec for deletion of authorized OAuth2 application
Closes #14370 Move gon function into its own helper
Diffstat (limited to 'app/models/oauth_access_token.rb')
-rw-r--r--app/models/oauth_access_token.rb19
1 files changed, 19 insertions, 0 deletions
diff --git a/app/models/oauth_access_token.rb b/app/models/oauth_access_token.rb
new file mode 100644
index 00000000000..c78c7f4aa0e
--- /dev/null
+++ b/app/models/oauth_access_token.rb
@@ -0,0 +1,19 @@
+# == Schema Information
+#
+# Table name: oauth_access_tokens
+#
+# id :integer not null, primary key
+# resource_owner_id :integer
+# application_id :integer
+# token :string not null
+# refresh_token :string
+# expires_in :integer
+# revoked_at :datetime
+# created_at :datetime not null
+# scopes :string
+#
+
+class OauthAccessToken < ActiveRecord::Base
+ belongs_to :resource_owner, class_name: 'User'
+ belongs_to :application, class_name: 'Doorkeeper::Application'
+end