This is an automated email from the ASF dual-hosted git repository. dpavlov pushed a commit to branch master in repository https://gitbox.apache.org/repos/asf/ignite-teamcity-bot.git
The following commit(s) were added to refs/heads/master by this push: new c1a7f22 Background ignite start c1a7f22 is described below commit c1a7f22528dd67d4f6df2f9d5b2d7de3bc9fadf1 Author: Dmitriy Pavlov <dpav...@apache.org> AuthorDate: Sat Sep 22 21:17:14 2018 +0300 Background ignite start --- .../apache/ignite/ci/web/auth/AuthenticationFilter.java | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/auth/AuthenticationFilter.java b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/auth/AuthenticationFilter.java index 17fb6d8..6ac8b86 100644 --- a/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/auth/AuthenticationFilter.java +++ b/ignite-tc-helper-web/src/main/java/org/apache/ignite/ci/web/auth/AuthenticationFilter.java @@ -43,7 +43,8 @@ import org.apache.ignite.ci.user.UserSession; import org.apache.ignite.ci.util.Base64Util; import org.apache.ignite.ci.util.CryptUtil; import org.apache.ignite.ci.web.CtxListener; -import org.apache.ignite.ci.web.rest.login.ServiceUnauthorizedException; +import org.apache.ignite.ci.web.rest.exception.ServiceStartingException; +import org.apache.ignite.ci.web.rest.exception.ServiceUnauthorizedException; import org.glassfish.jersey.internal.util.Base64; import org.jetbrains.annotations.NotNull; import org.slf4j.Logger; @@ -119,7 +120,17 @@ public class AuthenticationFilter implements ContainerRequestFilter { String tokenFull = authString.substring(TOKEN_SCHEME.length()).trim(); - if (!authenticate(requestContext, tokenFull, CtxListener.getTcHelper(context).users())) { + final UserAndSessionsStorage users = CtxListener.getTcHelper(context).users(); + + try { + users.getIgnite(); + } catch (ServiceStartingException e) { + throw e; + } catch (Exception e) { + requestContext.abortWith(rspUnathorized()); + } + + if (!authenticate(requestContext, tokenFull, users)) { requestContext.abortWith(rspUnathorized()); return; @@ -188,7 +199,7 @@ public class AuthenticationFilter implements ContainerRequestFilter { } } catch (Exception e) { - e.printStackTrace(); + logger.info("Exception during decrypt " + e.getMessage(), e); return false; }