Exemple #1
0
 def __init__(self, config=None):
     super().__init__(config)
     if config:
         if "newPassword" in config:
             if isinstance(config["newPassword"],
                           password_credential.PasswordCredential):
                 self.new_password = config["newPassword"]
             elif config["newPassword"] is not None:
                 self.new_password = password_credential.PasswordCredential(
                     config["newPassword"])
             else:
                 self.new_password = None
         else:
             self.new_password = None
         if "oldPassword" in config:
             if isinstance(config["oldPassword"],
                           password_credential.PasswordCredential):
                 self.old_password = config["oldPassword"]
             elif config["oldPassword"] is not None:
                 self.old_password = password_credential.PasswordCredential(
                     config["oldPassword"])
             else:
                 self.old_password = None
         else:
             self.old_password = None
     else:
         self.new_password = None
         self.old_password = None
 def __init__(self, config=None):
     super().__init__(config)
     if config:
         if "password" in config:
             if isinstance(config["password"],
                           password_credential.PasswordCredential):
                 self.password = config["password"]
             elif config["password"] is not None:
                 self.password = password_credential.PasswordCredential(
                     config["password"]
                 )
             else:
                 self.password = None
         else:
             self.password = None
         self.reveal_password = config["revealPassword"]\
             if "revealPassword" in config else None
         if "scheme" in config:
             if isinstance(config["scheme"],
                           application_credentials_scheme.ApplicationCredentialsScheme):
                 self.scheme = config["scheme"]
             elif config["scheme"] is not None:
                 self.scheme = application_credentials_scheme.ApplicationCredentialsScheme(
                     config["scheme"].upper()
                 )
             else:
                 self.scheme = None
         else:
             self.scheme = None
         if "signing" in config:
             if isinstance(config["signing"],
                           application_credentials_signing.ApplicationCredentialsSigning):
                 self.signing = config["signing"]
             elif config["signing"] is not None:
                 self.signing = application_credentials_signing.ApplicationCredentialsSigning(
                     config["signing"]
                 )
             else:
                 self.signing = None
         else:
             self.signing = None
         self.user_name = config["userName"]\
             if "userName" in config else None
     else:
         self.password = None
         self.reveal_password = None
         self.scheme = None
         self.signing = None
         self.user_name = None
Exemple #3
0
 def __init__(self, config=None):
     super().__init__(config)
     if config:
         if "password" in config:
             if isinstance(config["password"],
                           password_credential.PasswordCredential):
                 self.password = config["password"]
             elif config["password"] is not None:
                 self.password = password_credential.PasswordCredential(
                     config["password"])
             else:
                 self.password = None
         else:
             self.password = None
         if "provider" in config:
             if isinstance(config["provider"],
                           authentication_provider.AuthenticationProvider):
                 self.provider = config["provider"]
             elif config["provider"] is not None:
                 self.provider = authentication_provider.AuthenticationProvider(
                     config["provider"])
             else:
                 self.provider = None
         else:
             self.provider = None
         if "recoveryQuestion" in config:
             if isinstance(
                     config["recoveryQuestion"],
                     recovery_question_credential.RecoveryQuestionCredential
             ):
                 self.recovery_question = config["recoveryQuestion"]
             elif config["recoveryQuestion"] is not None:
                 self.recovery_question = recovery_question_credential.RecoveryQuestionCredential(
                     config["recoveryQuestion"])
             else:
                 self.recovery_question = None
         else:
             self.recovery_question = None
     else:
         self.password = None
         self.provider = None
         self.recovery_question = None