question: public GenericPrincipal authenticate ( String username , String password ) { GenericPrincipal principal = m_userPrincipal . get ( username ) ; if ( principal != null ) { if ( ! password . equals ( principal . getPassword ( ) ) ) throw new SpaceSecurityException ( "Wrong password for user name: " + username ) ; } else throw new SpaceSecurityException ( "Unknown user name: " + username ) ; return principal ; }
target:  Return the Principal associated with the specified username and credentials, if there is one; otherwise throws SecurityException.