if (F.isEmpty(sesTok) && clientId == null) { if (ctx.authentication().enabled() && req.command() != AUTHENTICATE && req.credentials() == null) throw new IgniteAuthenticationException("Failed to handle request - session token not found or invalid");
/** * Perform authentication. * * @return Auth context. * @throws IgniteCheckedException If failed. */ protected AuthorizationContext authenticate(String user, String pwd) throws IgniteCheckedException { if (ctx.security().enabled()) authCtx = authenticateExternal(user, pwd).authorizationContext(); else if (ctx.authentication().enabled()) { if (F.isEmpty(user)) throw new IgniteAccessControlException("Unauthenticated sessions are prohibited."); authCtx = ctx.authentication().authenticate(user, pwd); if (authCtx == null) throw new IgniteAccessControlException("Unknown authentication error."); } else authCtx = null; return authCtx; }
log.debug("Received request from client: " + req); boolean authenticationEnabled = ctx.authentication().enabled(); boolean securityEnabled = ctx.security().enabled();
if (F.isEmpty(sesTok) && clientId == null) { if (ctx.authentication().enabled() && req.command() != AUTHENTICATE && req.credentials() == null) throw new IgniteAuthenticationException("Failed to handle request - session token not found or invalid");
/** * Perform authentication. * * @return Auth context. * @throws IgniteCheckedException If failed. */ protected AuthorizationContext authenticate(String user, String pwd) throws IgniteCheckedException { if (ctx.security().enabled()) authCtx = authenticateExternal(user, pwd).authorizationContext(); else if (ctx.authentication().enabled()) { if (F.isEmpty(user)) throw new IgniteAccessControlException("Unauthenticated sessions are prohibited."); authCtx = ctx.authentication().authenticate(user, pwd); if (authCtx == null) throw new IgniteAccessControlException("Unknown authentication error."); } else authCtx = null; return authCtx; }
log.debug("Received request from client: " + req); boolean authenticationEnabled = ctx.authentication().enabled(); boolean securityEnabled = ctx.security().enabled();