Class: PredictabilityEngine::JiraAuth::MfaBrowser

Inherits:
Base
  • Object
show all
Defined in:
lib/predictability_engine/jira_auth/mfa_browser.rb

Overview

Browser-assisted IdP authentication for MFA gateways.

Two sub-modes selected by ‘idp_callback_port`:

  1. Manual-paste (default, no extra deps): Prints the idp_login_url and asks the user to paste back the resulting bearer token or cookie string.

  2. Local callback server (experimental, set idp_callback_port: PORT): Starts a WEBrick listener on localhost:PORT, opens the browser, captures the token/code from the redirect query params, then exchanges a code for a token if mfa_token_exchange_url is set.

Constant Summary collapse

CALLBACK_TIMEOUT =
120

Instance Method Summary collapse

Methods inherited from Base

#initialize, #post_init

Constructor Details

This class inherits a constructor from PredictabilityEngine::JiraAuth::Base

Instance Method Details

#jira_options(base_options) ⇒ Object



23
24
25
# File 'lib/predictability_engine/jira_auth/mfa_browser.rb', line 23

def jira_options(base_options)
  bearer_merge(base_options, @config[:idp_callback_port] ? callback_server_flow : manual_paste_flow)
end