Results 1 to 2 of 2

Thread: RemoteAuthorizationException

  1. #1
    Join Date
    Nov 2004
    Posts
    3

    Default RemoteAuthorizationException

    How can I determine what caused a RemoteAuthorizationException when using Acegi with remoting? It seems to always return "Bad credentials" even when I supply a username that does not exist.

    Thanks.

  2. #2
    Join Date
    Aug 2004
    Location
    Sydney, Australia
    Posts
    2,768

    Default

    This is often by design. Try setting the DaoAuthenticationProvider.hideUserNotFoundExceptio ns property. Also note the code of RemoteAuthenticationManagerImpl does expose the exception message:

    Code:
        public GrantedAuthority[] attemptAuthentication(String username,
            String password) throws RemoteAuthenticationException {
            UsernamePasswordAuthenticationToken request = new UsernamePasswordAuthenticationToken(username,
                    password);
    
            try {
                return authenticationManager.authenticate(request).getAuthorities();
            } catch (AuthenticationException authEx) {
                throw new RemoteAuthenticationException(authEx.getMessage());
            }
        }

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •