Module: FmRest::Spyke::Model::Auth
- Extended by:
- ActiveSupport::Concern
- Included in:
- FmRest::Spyke::Model
- Defined in:
- lib/fmrest/spyke/model/auth.rb
Class Method Summary collapse
-
.logout ⇒ Boolean
Logs out the database session for this model (and other models using the same credentials).
-
.logout! ⇒ Object
Logs out the database session for this model (and other models using the same credentials).
- .request_auth_token ⇒ Object
- .request_auth_token! ⇒ Object
Class Method Details
.logout ⇒ Boolean
Logs out the database session for this model (and other models
using the same credentials). Unlike logout!
, no exception is
raised in case of missing session token.
25 26 27 28 29 30 |
# File 'lib/fmrest/spyke/model/auth.rb', line 25 def logout logout! true rescue FmRest::V1::TokenSession::NoSessionTokenSet false end |
.logout! ⇒ Object
Logs out the database session for this model (and other models using the same credentials).
15 16 17 |
# File 'lib/fmrest/spyke/model/auth.rb', line 15 def logout! connection.delete(FmRest::V1.session_path("dummy-token")) end |