def test_init(self):
        testbot = Bot(Brain(BrainConfiguration()), BotConfiguration())

        service = ClientIdAuthenticationService(BrainSecurityConfiguration("authentication"))
        self.assertIsNotNone(service)
        self.assertTrue(service.authenticate(testbot, "console"))
        self.assertFalse(service.authenticate(testbot, "anyone"))
Beispiel #2
0
 def test_init(self):
     service = ClientIdAuthenticationService(BrainSecurityAuthenticationConfiguration())
     self.assertIsNotNone(service)
     self._client_context._userid = "console"
     self.assertTrue(service.authenticate(self._client_context))
     self._client_context._userid = "anyone"
     self.assertFalse(service.authenticate(self._client_context))
Beispiel #3
0
 def test_init(self):
     service = ClientIdAuthenticationService(BrainSecurityAuthenticationConfiguration())
     self.assertIsNotNone(service)
     self._client_context._userid = "console"
     self.assertTrue(service.authenticate(self._client_context))
     self._client_context._userid = "anyone"
     self.assertFalse(service.authenticate(self._client_context))
 def __init__(self, brain_config):
     ClientIdAuthenticationService.__init__(self, brain_config)
     self.should_authorised = False
     self.raise_exception = False
Beispiel #5
0
 def __init__(self, brain_config):
     ClientIdAuthenticationService.__init__(self, brain_config)
     self.should_authorised = False
     self.raise_exception = False