mirror of
				https://github.com/juspay/hyperswitch.git
				synced 2025-10-31 18:17:13 +08:00 
			
		
		
		
	feat(core): confirm flow and authorization api changes for external authentication (#4015)
Co-authored-by: hyperswitch-bot[bot] <148525504+hyperswitch-bot[bot]@users.noreply.github.com> Co-authored-by: sai-harsha-vardhan <harsha111hero@gmail.com> Co-authored-by: Sai Harsha Vardhan <56996463+sai-harsha-vardhan@users.noreply.github.com>
This commit is contained in:
		| @ -13,7 +13,7 @@ use crate::{ | ||||
|     routes::AppState, | ||||
|     services::{self, execute_connector_processing_step}, | ||||
|     types::{ | ||||
|         api, | ||||
|         api::{self, ConnectorCallType}, | ||||
|         authentication::{AuthNFlowType, AuthenticationResponseData}, | ||||
|         storage, | ||||
|         transformers::ForeignFrom, | ||||
| @ -22,6 +22,34 @@ use crate::{ | ||||
|     utils::OptionExt, | ||||
| }; | ||||
|  | ||||
| pub fn get_connector_name_if_separate_authn_supported( | ||||
|     connector_call_type: &ConnectorCallType, | ||||
| ) -> Option<String> { | ||||
|     match connector_call_type { | ||||
|         ConnectorCallType::PreDetermined(connector_data) => { | ||||
|             if connector_data | ||||
|                 .connector_name | ||||
|                 .is_separate_authentication_supported() | ||||
|             { | ||||
|                 Some(connector_data.connector_name.to_string()) | ||||
|             } else { | ||||
|                 None | ||||
|             } | ||||
|         } | ||||
|         ConnectorCallType::Retryable(connectors) => connectors.first().and_then(|connector_data| { | ||||
|             if connector_data | ||||
|                 .connector_name | ||||
|                 .is_separate_authentication_supported() | ||||
|             { | ||||
|                 Some(connector_data.connector_name.to_string()) | ||||
|             } else { | ||||
|                 None | ||||
|             } | ||||
|         }), | ||||
|         ConnectorCallType::SessionMultiple(_) => None, | ||||
|     } | ||||
| } | ||||
|  | ||||
| pub async fn update_trackers<F: Clone, Req>( | ||||
|     state: &AppState, | ||||
|     router_data: RouterData<F, Req, AuthenticationResponseData>, | ||||
|  | ||||
		Reference in New Issue
	
	Block a user
	 Hrithikesh
					Hrithikesh