Home > Object Persistency API > API Reference > Login and Logout
There are two methods in the SecurityContext interface available for login and logout respectively. Please note that the EOContainerSession interface inherits these methods from SecurityContext.
package org.oomega.persistence; public interface SecurityContext { public void login(String user, String password) throws AuthenticationException; public void logout(); }
As soon as you obtain a session from an EOContainer you are logged in implicitly. If you do not provide a user/password combination when you ask for a new session you are logged in with the public user and an empty password. You are able to change the user throughout a session with the methods mentioned above.
Next chapter: Object Creation and Deletion