String password = credentials.substring(credentials.indexOf(":") + 1); if (StringUtils.isBlank(username) || StringUtils.isBlank(password)) { throw new AuthenticationFailedException("username and password cannot be empty", User.getUserFromUserName (username)); MultitenantUtils.getTenantAwareUsername(username), password); if (!isAuthenticated) { throw new InvalidCredentialsException("Authentication Failed", User.getUserFromUserName(username)); log.debug("BasicAuthentication failed while trying to get the tenant ID of the user " + username, e); throw new AuthenticationFailedException(e.getMessage(), User.getUserFromUserName(username), e); } catch (Exception e) { log.error(e.getMessage(), e); throw new AuthenticationFailedException("Authentication Failed", User.getUserFromUserName(username));
String password = credentials.substring(credentials.indexOf(":") + 1); if (StringUtils.isBlank(username) || StringUtils.isBlank(password)) { throw new AuthenticationFailedException("username and password cannot be empty", User.getUserFromUserName (username)); MultitenantUtils.getTenantAwareUsername(username), password); if (!isAuthenticated) { throw new InvalidCredentialsException("Authentication Failed", User.getUserFromUserName(username)); log.debug("BasicAuthentication failed while trying to get the tenant ID of the user " + username, e); throw new AuthenticationFailedException(e.getMessage(), User.getUserFromUserName(username), e); } catch (Exception e) { log.error(e.getMessage(), e); throw new AuthenticationFailedException("Authentication Failed", User.getUserFromUserName(username));
throw new AuthenticationFailedException(e.getMessage(), User.getUserFromUserName(request.getParameter (BasicAuthenticatorConstants.USER_NAME)), e);
throw new AuthenticationFailedException(e.getMessage(), User.getUserFromUserName(request.getParameter (BasicAuthenticatorConstants.USER_NAME)), e);
} else { throw new AuthenticationFailedException("Cannot find the user realm for the given tenant: " + tenantId, User.getUserFromUserName(username)); log.debug("BasicAuthentication failed while trying to get the tenant ID of the user " + username, e); throw new AuthenticationFailedException(e.getMessage(), User.getUserFromUserName(username), e); } catch (org.wso2.carbon.user.api.UserStoreException e) { if(log.isDebugEnabled()){ log.debug("BasicAuthentication failed while trying to authenticate", e); throw new AuthenticationFailedException(e.getMessage(), User.getUserFromUserName(username), e); User.getUserFromUserName(username));
} else { throw new AuthenticationFailedException("Cannot find the user realm for the given tenant: " + tenantId, User.getUserFromUserName(username)); log.debug("BasicAuthentication failed while trying to get the tenant ID of the user " + username, e); throw new AuthenticationFailedException(e.getMessage(), User.getUserFromUserName(username), e); } catch (org.wso2.carbon.user.api.UserStoreException e) { if (log.isDebugEnabled()) { log.debug("BasicAuthentication failed while trying to authenticate", e); throw new AuthenticationFailedException(e.getMessage(), User.getUserFromUserName(username), e); User.getUserFromUserName(username));
throw new AuthenticationFailedException("Authentication Failed", User.getUserFromUserName (validationResponse.getAuthorizedUser())); } catch (Exception e) { log.error(e.getMessage(), e); throw new AuthenticationFailedException(e.getMessage(), User.getUserFromUserName(user), e);
serviceProvider.setOwner(User.getUserFromUserName(userName)); serviceProvider.setDescription("Service Provider for application " + applicationName); appMgtService.updateApplication(serviceProvider, tenantDomain, ownerName);
} else if (radiusResponseType == RadiusResponse.ACCESS_REJECT) { // Authentication Failed. throw new InvalidCredentialsException("User authentication failed due to invalid credentials", User.getUserFromUserName(userName)); User.getUserFromUserName(userName)); } catch (CasqueException ce) { throw new AuthenticationFailedException("Unable to continue the authentication process ", ce);
" User authentication failed due to invalid credentials ", User.getUserFromUserName(userName)); User.getUserFromUserName(userName)); } catch (CasqueException ce) { throw new AuthenticationFailedException("Unable to start the authentication process", ce);