(self, username, password)
return self.v2_auth_token
Get a login token from username and password
Get a login token from username and password
Get a login token from username and password
def get_v2_login_token(self, username, password):
        """Get a login token from username and password"""
        if not (username and password):
            return ""
        try:
            self.v2_auth_token = \
                base64.b64encode(("%s:%s" % \
                    (username, password)).encode("utf-8")).decode("ascii")
        except (KeyError, AttributeError, TypeError, ValueError, NameError):
            self.v2_auth_token = ""
        return self.v2_auth_token
def get_v2_login_token ( self , username , password ) : if not ( username and password ) : return "" try : self . v2_auth_token = base64 . b64encode ( ( "%s:%s" % ( username , password ) ) . encode ( "utf-8" ) ) . decode ( "ascii" ) except ( KeyError , AttributeError , TypeError , ValueError , NameError ) : self . v2_auth_token = "" return self . v2_auth_token