FlowStore

class FlowStore(pconfig)[source]
__init__(pconfig)[source]
add_flow(key, value)[source]
Return type

None

add_flowgraph(key, value)[source]
Return type

None

__getitem__(name)[source]

Getter to return a Flow by the name.

Return type

Any

get_flow_id_by_name(flow_name)[source]
Return type

int

get_flow_id_by_flow(flow)[source]
Return type

int

get_flow_name_by_flow(flow)[source]
Return type

int

get_flow_name_by_id(flow_id)[source]

Returns the flow name given its number.

Each authentication step is given an index based on its position in the “_authentication” list. This function returns the name of the Flow based on its position in this list.

Parameters

flow_id (int) – An integer with the index of the flow.

Return type

str

Returns

A string with the name of the Flow in the position “flow_id”.

get_flow_index(name)[source]

Returns the index of the flow given its name.

Return type

int

Returns

An integer with the index of the Flow with the specified “name”.

is_flow(name)[source]
is_flowgraph(name)[source]
property keys: List[str]
Return type

List[str]

property values: List[Any]
Return type

List[Any]

run_flow(pconfig, flow_id)[source]

Runs one authentication Flow.

First, the Flow object of the specified flow is identified, then the related HTTP request is processed, sent, the response is received, and the operations are run on the Flow.

Parameters
  • flow_id (Union[int, str]) – A string or an integer identifying the authentication flow to run. If it’s a string, it’s the name of the Flow, and if it’s an integer, it’s the index of the Flow object in the “_authentication” variable.

  • config – A Config object with the global Raider settings.

Return type

Optional[str]

Returns

Optionally, this function returns a string with the name of the next Flow in the authentication process.

run_flowgraph(pconfig, name, test=False)[source]

Runs all authentication flows.

This function will run all authentication flows for the specified User and will take into account the supplied Config for things like the user agent and the web proxy to use.

Parameters
  • user – A User object containing the credentials and where the user specific data will be stored.

  • config – A Config object with the global Raider settings.

Return type

None