Module: Auth0::Api::V2::Sessions
- Included in:
- Auth0::Api::V2
- Defined in:
- lib/auth0/api/v2/sessions.rb
Overview
Methods to use the Session endpoints
Instance Method Summary collapse
-
#delete_session(session_id) ⇒ Object
Deletes a session by id.
-
#revoke_session(session_id) ⇒ Object
Revokes a session by ID and all associated refresh tokens.
-
#session(session_id) ⇒ Object
Retrieve session information by id.
Instance Method Details
#delete_session(session_id) ⇒ Object
Deletes a session by id
20 21 22 23 24 |
# File 'lib/auth0/api/v2/sessions.rb', line 20 def delete_session(session_id) raise Auth0::InvalidParameter, 'Must supply a valid session_id' if session_id.to_s.empty? delete "#{sessions_path}/#{session_id}" end |
#revoke_session(session_id) ⇒ Object
Revokes a session by ID and all associated refresh tokens
29 30 31 32 33 |
# File 'lib/auth0/api/v2/sessions.rb', line 29 def revoke_session(session_id) raise Auth0::InvalidParameter, 'Must supply a valid session_id' if session_id.to_s.empty? post "#{sessions_path}/#{session_id}/revoke" end |
#session(session_id) ⇒ Object
Retrieve session information by id
11 12 13 14 15 |
# File 'lib/auth0/api/v2/sessions.rb', line 11 def session(session_id) raise Auth0::InvalidParameter, 'Must supply a valid session_id' if session_id.to_s.empty? get "#{sessions_path}/#{session_id}" end |