AuthenticationSelectorContext selectContext(HttpServletRequest req,
 HttpServletResponse resp,
 Map<AuthenticationSourceKey, String> mappedAuthnSourcesNames, 
 Map<String, Object> extraParameters,   
 String resumePath)   

PingFederate calls the selectContext() method to determine which authentication source to select. The mappedAuthnSourcesNames contains the list of AuthenticationSourceKeys and names that are available for the selector to reference. The HttpServletRequest is available to evaluate cookies, parameters, headers, etc. to help determine which authentication source should be selected. The HttpServletResponse is also available if the authentication selector requires user interaction to help determine the appropriate authentication source to select. If the resp object is written to, it is considered a committed response and returned to the user's browser. The resumePath is a relative URL that should be used in conjunction with the resp object, such that the user's browser can be sent to this URL to resume the SSO workflow.

Once an authentication source is selected, an AuthenticationSelectorContext can be created to denote which authentication source to use. The selected authentication source can be referenced by its ID or by its context. The context is a name that decouples authentication selectors from the configured IDs.