Skip to content

Commit

Permalink
🎁 Adding logic for handling user signin
Browse files Browse the repository at this point in the history
With this change, we're adding the logic for handling a user
authenticating:

- namely expiring any authorizations that are "expired"
- re-authorizing any work_pids that were provided as part of
  authentication.

Related to:

- #633
- #647
  • Loading branch information
jeremyf committed Aug 29, 2023
1 parent 42be90d commit bb168ae
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/work_authorization.rb
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ def self.handle_signin_for!(user:, authorize_until: 1.day.from_now, work_pid: ni
#
# @see .revoke!
# rubocop:disable Rails/FindBy
def self.authorize!(user:, work_pid:, expires_at: 1.day.from_now)
def self.authorize!(user:, work_pid:, expires_at: 1.days.from_now)
work = ActiveFedora::Base.where(id: work_pid).first
raise WorkNotFoundError.new(user: user, work_pid: work_pid) unless work

Expand Down

0 comments on commit bb168ae

Please sign in to comment.