def validate_external_credential(external_credential):
 if ((not external_credential) or ('#' not in external_credential)):
  return False
 (profile_name, technical_id) = external_credential.split('#', 1)
 if (profile_name not in settings.EXTERNAL_IDENTITY_PROFILE):
  return False
 if (len(technical_id) <= 0):
  return False
 provider = settings.EXTERNAL_IDENTITY_PROFILE[profile_name]
 return {'provider': provider, 'id': technical_id}

def validate_external_credential ( external_credential ) : if ( ( not external_credential ) or ( '#' not in external_credential ) ) : return False ( profile_name , technical_id ) = external_credential . split ( '#' , 1 ) if ( profile_name not in settings . EXTERNAL_IDENTITY_PROFILE ) : return False if ( len ( technical_id ) <= 0 ) : return False provider = settings . EXTERNAL_IDENTITY_PROFILE [ profile_name ] return { 'provider' : provider , 'id' : technical_id }
validate the external credential .