Skip to content
This repository has been archived by the owner on May 2, 2024. It is now read-only.

Commit

Permalink
doorkeeper initial
Browse files Browse the repository at this point in the history
  • Loading branch information
reesericci committed Jan 18, 2024
1 parent 55aace0 commit fe62127
Show file tree
Hide file tree
Showing 7 changed files with 780 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -116,3 +116,5 @@ gem "activejob-status", "~> 1.0"
gem "standard", "~> 1.33"

gem "standard-rails", "~> 1.0"

gem "doorkeeper", "~> 5.6"
3 changes: 3 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ GEM
diff-lcs (1.5.0)
dnsimple (8.7.1)
httparty
doorkeeper (5.6.8)
railties (>= 5)
dotenv (2.8.1)
dotenv-rails (2.8.1)
dotenv (= 2.8.1)
Expand Down Expand Up @@ -444,6 +446,7 @@ DEPENDENCIES
dalli (~> 3.2)
debug
dnsimple (~> 8.1)
doorkeeper (~> 5.6)
dotenv-rails
erb-formatter
importmap-rails (~> 1.2)
Expand Down
10 changes: 10 additions & 0 deletions app/models/user/user.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,16 @@ class User::User < ApplicationRecord
validates :email, uniqueness: true # standard:disable all
has_many :user_credentials # standard:disable all

has_many :access_grants,

Check failure on line 5 in app/models/user/user.rb

View workflow job for this annotation

GitHub Actions / StandardRB

app/models/user/user.rb#L5

Specify an `:inverse_of` option.
class_name: 'Doorkeeper::AccessGrant',

Check failure on line 6 in app/models/user/user.rb

View workflow job for this annotation

GitHub Actions / StandardRB

app/models/user/user.rb#L6

Use one level of indentation for arguments following the first line of a multi-line method call.

Check failure on line 6 in app/models/user/user.rb

View workflow job for this annotation

GitHub Actions / StandardRB

app/models/user/user.rb#L6

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
foreign_key: :resource_owner_id,

Check failure on line 7 in app/models/user/user.rb

View workflow job for this annotation

GitHub Actions / StandardRB

app/models/user/user.rb#L7

Use one level of indentation for arguments following the first line of a multi-line method call.
dependent: :delete_all

Check failure on line 8 in app/models/user/user.rb

View workflow job for this annotation

GitHub Actions / StandardRB

app/models/user/user.rb#L8

Use one level of indentation for arguments following the first line of a multi-line method call.

has_many :access_tokens,

Check failure on line 10 in app/models/user/user.rb

View workflow job for this annotation

GitHub Actions / StandardRB

app/models/user/user.rb#L10

Specify an `:inverse_of` option.
class_name: 'Doorkeeper::AccessToken',

Check failure on line 11 in app/models/user/user.rb

View workflow job for this annotation

GitHub Actions / StandardRB

app/models/user/user.rb#L11

Use one level of indentation for arguments following the first line of a multi-line method call.

Check failure on line 11 in app/models/user/user.rb

View workflow job for this annotation

GitHub Actions / StandardRB

app/models/user/user.rb#L11

Prefer double-quoted strings unless you need single quotes to avoid extra backslashes for escaping.
foreign_key: :resource_owner_id,

Check failure on line 12 in app/models/user/user.rb

View workflow job for this annotation

GitHub Actions / StandardRB

app/models/user/user.rb#L12

Use one level of indentation for arguments following the first line of a multi-line method call.
dependent: :delete_all

Check failure on line 13 in app/models/user/user.rb

View workflow job for this annotation

GitHub Actions / StandardRB

app/models/user/user.rb#L13

Use one level of indentation for arguments following the first line of a multi-line method call.

Check failure on line 14 in app/models/user/user.rb

View workflow job for this annotation

GitHub Actions / StandardRB

app/models/user/user.rb#L14

Trailing whitespace detected.
after_initialize do
@hotp = ROTP::HOTP.new(hotp_token)
end
Expand Down
Loading

0 comments on commit fe62127

Please sign in to comment.