예제 #1
0
        private void init()
        {
            AuthenticateInMemoryAdapter authenticateInMemoryAdapter = new AuthenticateInMemoryAdapter();

            authenticator = new AuthenticateInMemoryImpl(authenticateInMemoryAdapter);

            Authenticate authenticate0 = new Authenticate(new AuthenticateId("0"), "login0", Role.librarian);

            authenticator.Add(authenticate0, "password0");

            Authenticate authenticate1 = new Authenticate(new AuthenticateId("1"), "login1", Role.librarian);

            authenticator.Add(authenticate1, "password1");

            Authenticate authenticate2 = new Authenticate(new AuthenticateId("2"), "login2", Role.librarian);

            authenticator.Add(authenticate2, "password2");
        }
예제 #2
0
 public AuthenticateInMemoryImpl(AuthenticateInMemoryAdapter authenticateInMemoryAdapter)
 {
     datas        = new Dictionary <string, AuthenticateInMemoryDao>();
     this.adapter = authenticateInMemoryAdapter;
 }
예제 #3
0
        private void initEmpty()
        {
            AuthenticateInMemoryAdapter authenticateInMemoryAdapter = new AuthenticateInMemoryAdapter();

            authenticator = new AuthenticateInMemoryImpl(authenticateInMemoryAdapter);
        }