session.rb 426 B

123456789101112131415161718
  1. # Copyright (C) 2012-2024 Zammad Foundation, https://zammad-foundation.org/
  2. module Gql::Queries
  3. class Session < BaseQuery
  4. description 'The sessionId of the currently authenticated user.'
  5. type Gql::Types::SessionType, null: false
  6. def resolve(...)
  7. {
  8. id: context[:sid],
  9. after_auth: Auth::AfterAuth.run(context.current_user, context[:controller].session)
  10. }
  11. end
  12. end
  13. end