IbkrApi.Support.HTTPStubs.AuthStub (ibkr_api v1.0.3)

View Source

Stub 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

stub_check_auth_status(response_fn \\ nil)

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}))

stub_end_session(response_fn \\ nil)

Stubs the end_session endpoint.

Examples

AuthStub.stub_end_session()
# Or with custom response:
AuthStub.stub_end_session(HTTPMock.success(%{logout: true}))

stub_ping_server(response_fn \\ nil)

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}}}))

stub_reauthenticate(response_fn \\ nil)

Stubs the reauthenticate endpoint.

Examples

AuthStub.stub_reauthenticate()
# Or with custom response:
AuthStub.stub_reauthenticate(HTTPMock.success(%{authenticated: false}))

stub_validate_sso(response_fn \\ nil)

Stubs the validate_sso endpoint.

Examples

AuthStub.stub_validate_sso()
# Or with custom response:
AuthStub.stub_validate_sso(HTTPMock.success(%{result: true}))