Class: SignIn::RevokeSessionsForUser

Inherits:
Object
  • Object
show all
Defined in:
app/services/sign_in/revoke_sessions_for_user.rb

Instance Attribute Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(user_account:) ⇒ RevokeSessionsForUser

Returns a new instance of RevokeSessionsForUser.



7
8
9
# File 'app/services/sign_in/revoke_sessions_for_user.rb', line 7

def initialize(user_account:)
  @user_account = 
end

Instance Attribute Details

#sessionsObject (readonly)

Returns the value of attribute sessions.



5
6
7
# File 'app/services/sign_in/revoke_sessions_for_user.rb', line 5

def sessions
  @sessions
end

#user_accountObject (readonly)

Returns the value of attribute user_account.



5
6
7
# File 'app/services/sign_in/revoke_sessions_for_user.rb', line 5

def 
  @user_account
end

Instance Method Details

#delete_sessions!Object (private)



17
18
19
# File 'app/services/sign_in/revoke_sessions_for_user.rb', line 17

def delete_sessions!
  OAuthSession.where(user_account:).destroy_all
end

#performObject



11
12
13
# File 'app/services/sign_in/revoke_sessions_for_user.rb', line 11

def perform
  delete_sessions!
end