IbkrApi.Support.HTTPStubs.AuthStub (ibkr_api v1.0.3)
View SourceStub module for IbkrApi.ClientPortal.Auth HTTP requests.
Summary
Functions
Stubs the check_auth_status endpoint.
Stubs the end_session endpoint.
Stubs the ping_server endpoint.
Stubs the reauthenticate endpoint.
Stubs the validate_sso endpoint.
Functions
Stubs the check_auth_status endpoint.
Examples
AuthStub.stub_check_auth_status()
# Or with custom response:
AuthStub.stub_check_auth_status(HTTPMock.success(%{authenticated: true}))
Stubs the end_session endpoint.
Examples
AuthStub.stub_end_session()
# Or with custom response:
AuthStub.stub_end_session(HTTPMock.success(%{logout: true}))
Stubs the ping_server endpoint.
Examples
AuthStub.stub_ping_server()
# Or with custom response:
AuthStub.stub_ping_server(HTTPMock.success(%{iserver: %{auth_status: %{authenticated: true}}}))
Stubs the reauthenticate endpoint.
Examples
AuthStub.stub_reauthenticate()
# Or with custom response:
AuthStub.stub_reauthenticate(HTTPMock.success(%{authenticated: false}))
Stubs the validate_sso endpoint.
Examples
AuthStub.stub_validate_sso()
# Or with custom response:
AuthStub.stub_validate_sso(HTTPMock.success(%{result: true}))