<commit_before>require('jquery');

//TODO-benC: this file is doing to much, GET/POST/Links/Redirect - needs to be split out.

/**
 * SSO encryption process file
 * Use Cases:
 * Customer clicks a link
 * Customer is sent to a page which contains a redirect element
 *
 * SSO GET call is successful then let the SSO redirect manage that.
 * SSO GET call is a failure cancel
 * - 401 (Unauthorised) - reload the page (this is currently used for links only)
 * - Anything else, render the returned html error page and place in the page (BadRequest from Encryption process)
 *
 * @param element
 * @param ssoUrl
 * @param ssoMethod<commit_msg>YTA-1189: added TODO for unit tests, this file needs a refactor before adding tests<commit_after>require('jquery');

//TODO-benC: this file is doing to much, GET/POST/Links/Redirect - needs to be split out.
//TODO-benC: after refactor unit test this work

/**
 * SSO encryption process file
 * Use Cases:
 * Customer clicks a link
 * Customer is sent to a page which contains a redirect element
 *
 * SSO GET call is successful then let the SSO redirect manage that.
 * SSO GET call is a failure cancel
 * - 401 (Unauthorised) - reload the page (this is currently used for links only)
 * - Anything else, render the returned html error page and place in the page (BadRequest from Encryption process)
 *
 * @param element
 * @param ssoUrl
 * @param ssoMethod
{'fraction_non_alphanumeric': 0.07521489971346705, 'fraction_numerical': 0.0071633237822349575, 'mean_word_length': 3.7679180887372015, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2635087', 'n_tokens_mistral': 396, 'n_tokens_neox': 381, 'n_words': 197}