@Test public void testIsAuthenticatedUserExists() throws Exception { AuthenticationResult result = new AuthenticationResult( true, "user", null ); boolean isAuthenticated = servletAuth.isAuthenticated( request, result ); assertTrue( isAuthenticated ); }
@Override public boolean isAuthenticated( HttpServletRequest request, AuthenticationResult result ) throws AuthenticationException, AccountLockedException, MustChangePasswordException { if ( result != null && !result.isAuthenticated() ) { throw new AuthenticationException( "User Credentials Invalid" ); } return true; }
ArchivaServletAuthenticator implements ServletAuthenticator { @Override public boolean isAuthenticated( HttpServletRequest request, AuthenticationResult result ) throws AuthenticationException, AccountLockedException, MustChangePasswordException { if ( result != null && !result.isAuthenticated() ) { throw new AuthenticationException( "User Credentials Invalid" ); } return true; } }
ArchivaServletAuthenticator implements ServletAuthenticator { @Override public boolean isAuthenticated( HttpServletRequest request, AuthenticationResult result ) throws AuthenticationException, AccountLockedException, MustChangePasswordException { if ( result != null && !result.isAuthenticated() ) { throw new AuthenticationException( "User Credentials Invalid" ); } return true; }  }
ArchivaServletAuthenticator implements ServletAuthenticator { @Override public boolean isAuthenticated( HttpServletRequest request, AuthenticationResult result ) throws AuthenticationException, AccountLockedException, MustChangePasswordException { if ( result != null && !result.isAuthenticated() ) { throw new AuthenticationException( "User Credentials Invalid" ); } return true; }  @Override boolean isAuthenticated( HttpServletRequest request, AuthenticationResult result ); @Override boolean isAuthorized( HttpServletRequest request, SecuritySession securitySession, String repositoryId,
                                 String permission ); @Override boolean isAuthorized( String principal, String repoId, String permission ); SecuritySystem getSecuritySystem(); void setSecuritySystem( SecuritySystem securitySystem ); }
ArchivaServletAuthenticator implements ServletAuthenticator { @Override public boolean isAuthenticated( HttpServletRequest request, AuthenticationResult result ) throws AuthenticationException, AccountLockedException, MustChangePasswordException { if ( result != null && !result.isAuthenticated() ) { throw new AuthenticationException( "User Credentials Invalid" ); } return true; }  @Override boolean isAuthenticated( HttpServletRequest request, AuthenticationResult result ); @Override boolean isAuthorized( HttpServletRequest request, SecuritySession securitySession, String repositoryId,
                                 String permission ); @Override boolean isAuthorized( String principal, String repoId, String permission ); SecuritySystem getSecuritySystem(); void setSecuritySystem( SecuritySystem securitySystem );  }