public Session login ( final String username , final String password ) throws RepositoryException { assertStateAfterOrEqual ( State . CREATED ) ; if ( ! userSessions . containsKey ( username ) ) { userSessions . put ( username , getRepository ( ) . login ( new SimpleCredentials ( username , password . toCharArray ( ) ) ) ) ; } return userSessions . get ( username ) ; }
Creates a login for the given username and password