summaryrefslogtreecommitdiff
path: root/app/models/authentication_event.rb
diff options
context:
space:
mode:
Diffstat (limited to 'app/models/authentication_event.rb')
-rw-r--r--app/models/authentication_event.rb12
1 files changed, 12 insertions, 0 deletions
diff --git a/app/models/authentication_event.rb b/app/models/authentication_event.rb
new file mode 100644
index 00000000000..1ac3c5fbd9c
--- /dev/null
+++ b/app/models/authentication_event.rb
@@ -0,0 +1,12 @@
+# frozen_string_literal: true
+
+class AuthenticationEvent < ApplicationRecord
+ belongs_to :user, optional: true
+
+ validates :provider, :user_name, :result, presence: true
+
+ enum result: {
+ failed: 0,
+ success: 1
+ }
+end