Beispiel #1
0
class AuthenticationController(object):
    '''
    Class responsible for setting authentication curl parameters.
    '''
    
    def __init__(self, model):
        ''' Constructor '''
        self.model = model
        self.data_wrapper = model.data_storage
        self.service_manager = WeblogicServicesFactory(Operation.PreService, model)
        
    def process_authentication(self, authentication_operation):
        
        try:
            # try to connect to the server
            self.service_manager.check_authentication(authentication_operation)
            self.model.update("Authentication succeeded")
        except AuthenticationError:
            self.service_manager.reauthenticate(authentication_operation)
Beispiel #2
0
 def __init__(self, model):
     ''' Constructor '''
     self.model = model
     self.data_wrapper = model.data_storage
     self.service_manager = WeblogicServicesFactory(Operation.PreService, model)