Method: SignInService::Client::Session#logout
- Defined in:
- lib/sign_in_service/client/session.rb
#logout(access_token:, anti_csrf_token: nil) ⇒ Faraday::Response
Destroys the user session associated with the access token.
19 20 21 22 23 24 25 26 27 28 29 |
# File 'lib/sign_in_service/client/session.rb', line 19 def logout(access_token:, anti_csrf_token: nil) connection.get(LOGOUT_PATH) do |req| req.params[:client_id] = client_id if req.headers = ({ access_token:, anti_csrf_token: }) else req.params[:anti_csrf_token] = anti_csrf_token req.headers = api_header(access_token) end end end |