protected LoginException wrapInLoginException(Throwable throwable) { //noinspection ThrowableResultOfMethodCallIgnored Throwable rootCause = ExceptionUtils.getRootCause(throwable); if (rootCause == null) { rootCause = throwable; } // todo rework, do not send exception messages they can contain sensitive configuration data // send text only to avoid ClassNotFoundException when the client has no dependency to some library return new InternalAuthenticationException(rootCause.toString()); }
throw new InternalAuthenticationException( "Authentication provider returned authentication details without session"); new InternalAuthenticationException("Exception is thrown by authentication provider");
} catch (RuntimeException re) { InternalAuthenticationException ie = new InternalAuthenticationException("Exception is thrown by login provider", re);