interface IIdpInfo { idp : string ; idpId : string ; } export default function extractIdpInfo ( message ) { const ipdBeforeMatcher = "idp = " ; const ipdAfterMatcher = " and idpId" ; const idpIdBeforeMatcher = "idpId = " ; return { idp : message . slice ( message . indexOf ( ipdBeforeMatcher ) + ipdBeforeMatcher . length , message . indexOf ( ipdAfterMatcher ) ) , idpId : message . slice ( message . indexOf ( idpIdBeforeMatcher ) + idpIdBeforeMatcher . length ) , } ; }