Module: Slack::Web::Api::Endpoints::AdminUsersSession
- Included in:
- Slack::Web::Api::Endpoints
- Defined in:
- lib/slack/web/api/endpoints/admin_users_session.rb
Instance Method Summary collapse
-
#admin_users_session_invalidate(options = {}) ⇒ Object
Revoke a single session for a user.
-
#admin_users_session_list(options = {}) ⇒ Object
List active user sessions for an organization.
-
#admin_users_session_reset(options = {}) ⇒ Object
Wipes all valid sessions on all devices for a given user.
Instance Method Details
#admin_users_session_invalidate(options = {}) ⇒ Object
Revoke a single session for a user. The user will be forced to login to Slack.
18 19 20 21 22 |
# File 'lib/slack/web/api/endpoints/admin_users_session.rb', line 18 def admin_users_session_invalidate( = {}) throw ArgumentError.new('Required arguments :session_id missing') if [:session_id].nil? throw ArgumentError.new('Required arguments :team_id missing') if [:team_id].nil? post('admin.users.session.invalidate', ) end |
#admin_users_session_list(options = {}) ⇒ Object
List active user sessions for an organization
37 38 39 40 41 42 43 44 45 |
# File 'lib/slack/web/api/endpoints/admin_users_session.rb', line 37 def admin_users_session_list( = {}) if block_given? Pagination::Cursor.new(self, :admin_users_session_list, ).each do |page| yield page end else post('admin.users.session.list', ) end end |
#admin_users_session_reset(options = {}) ⇒ Object
Wipes all valid sessions on all devices for a given user
58 59 60 61 |
# File 'lib/slack/web/api/endpoints/admin_users_session.rb', line 58 def admin_users_session_reset( = {}) throw ArgumentError.new('Required arguments :user_id missing') if [:user_id].nil? post('admin.users.session.reset', ) end |