public static FrameworkException error(String message, Throwable cause) { return new FrameworkException(message, cause); } }
private String getCallerPath(HttpServletRequest request) throws FrameworkException { String callerPath = request.getParameter(FrameworkConstants.RequestParams.CALLER_PATH); try { if (callerPath != null) { callerPath = URLDecoder.decode(callerPath, "UTF-8"); } } catch (UnsupportedEncodingException e) { throw new FrameworkException(e.getMessage(), e); } return callerPath; }
private String getCallerPath(HttpServletRequest request) throws FrameworkException { String callerPath = request.getParameter(FrameworkConstants.RequestParams.CALLER_PATH); try { if (callerPath != null) { callerPath = URLDecoder.decode(callerPath, "UTF-8"); } } catch (UnsupportedEncodingException e) { throw new FrameworkException(e.getMessage(), e); } return callerPath; }
private String getCallerPath(HttpServletRequest request) throws FrameworkException { String callerPath = request.getParameter(FrameworkConstants.RequestParams.CALLER_PATH); try { if (callerPath != null) { callerPath = URLDecoder.decode(callerPath, "UTF-8"); } } catch (UnsupportedEncodingException e) { throw new FrameworkException(e.getMessage(), e); } return callerPath; }
private ClaimManager getClaimManager(String tenantDomain, UserRealm realm) throws FrameworkException { ClaimManager claimManager = null; try { claimManager = realm.getClaimManager(); } catch (UserStoreException e) { throw new FrameworkException("Error occurred while retrieving the ClaimManager " + "from Realm for " + tenantDomain + " to handle local claims", e); } return claimManager; }
private ClaimManager getClaimManager(String tenantDomain, UserRealm realm) throws FrameworkException { ClaimManager claimManager = null; try { claimManager = realm.getClaimManager(); } catch (UserStoreException e) { throw new FrameworkException("Error occurred while retrieving the ClaimManager " + "from Realm for " + tenantDomain + " to handle local claims", e); } return claimManager; }
private ClaimManager getClaimManager(String tenantDomain, UserRealm realm) throws FrameworkException { ClaimManager claimManager = null; try { claimManager = realm.getClaimManager(); } catch (UserStoreException e) { throw new FrameworkException("Error occurred while retrieving the ClaimManager " + "from Realm for " + tenantDomain + " to handle local claims", e); } return claimManager; }
public static BundleContext getBundleContext() throws FrameworkException { BundleContext bundleContext = FrameworkServiceDataHolder.getInstance().getBundleContext(); if (bundleContext == null) { String msg = "System has not been started properly. Bundle Context is null."; log.error(msg); throw new FrameworkException(msg); } return bundleContext; }
private void displayLongWait(AuthenticationContext context, HttpServletRequest request, HttpServletResponse response) throws FrameworkException { try { String longWaitUrl = ConfigurationFacade.getInstance().getAuthenticationEndpointWaitURL(); response.sendRedirect(longWaitUrl + "?" + FrameworkConstants.SESSION_DATA_KEY + "=" + context .getContextIdentifier()); request.setAttribute(FrameworkConstants.RequestParams.FLOW_STATUS, AuthenticatorFlowStatus.INCOMPLETE); } catch (IOException e) { throw new FrameworkException("Error while redirecting to wait.do", e); } }
private void displayLongWait(AuthenticationContext context, HttpServletRequest request, HttpServletResponse response) throws FrameworkException { try { String longWaitUrl = ConfigurationFacade.getInstance().getAuthenticationEndpointWaitURL(); response.sendRedirect(longWaitUrl + "?" + FrameworkConstants.SESSION_DATA_KEY + "=" + context .getContextIdentifier()); request.setAttribute(FrameworkConstants.RequestParams.FLOW_STATUS, AuthenticatorFlowStatus.INCOMPLETE); } catch (IOException e) { throw new FrameworkException("Error while redirecting to wait.do", e); } }
private UserStoreManager getUserStoreManager(UserRealm realm, String userStoreDomain) throws UserStoreException, FrameworkException { UserStoreManager userStoreManager; if (userStoreDomain != null && !userStoreDomain.isEmpty()) { userStoreManager = realm.getUserStoreManager().getSecondaryUserStoreManager( userStoreDomain); } else { userStoreManager = realm.getUserStoreManager(); } if (userStoreManager == null) { throw new FrameworkException("Specified user store is invalid"); } return userStoreManager; }
private UserRealm getUserRealm(String tenantDomain) throws FrameworkException { UserRealm realm; try { realm = AnonymousSessionUtil.getRealmByTenantDomain( FrameworkServiceComponent.getRegistryService(), FrameworkServiceComponent.getRealmService(), tenantDomain); } catch (CarbonException e) { throw new FrameworkException("Error occurred while retrieving the Realm for " + tenantDomain + " to handle local claims", e); } return realm; }
private UserRealm getUserRealm(String tenantDomain) throws FrameworkException { UserRealm realm; try { realm = AnonymousSessionUtil.getRealmByTenantDomain( FrameworkServiceComponent.getRegistryService(), FrameworkServiceComponent.getRealmService(), tenantDomain); } catch (CarbonException e) { throw new FrameworkException("Error occurred while retrieving the Realm for " + tenantDomain + " to handle local claims", e); } return realm; }
public void exec(AsyncCaller caller, AsyncReturn returnFunction, AuthenticationContext authenticationContext) throws FrameworkException { if (returnFunction == null) { throw new FrameworkException("Can not execute the async process, as no callback function registered on " + "returnFunction."); } AsyncReturn wrappedReturn = (ctx, m, r) -> { this.execReturn(returnFunction, ctx, m, r); }; executorService.submit( new AsyncCallerTask( new ObservingAsyncProcess(caller, wrappedReturn, authenticationContext))); }
private UserRealm getUserRealm(String tenantDomain) throws FrameworkException { UserRealm realm; try { realm = AnonymousSessionUtil.getRealmByTenantDomain( FrameworkServiceComponent.getRegistryService(), FrameworkServiceComponent.getRealmService(), tenantDomain); } catch (CarbonException e) { throw new FrameworkException("Error occurred while retrieving the Realm for " + tenantDomain + " to handle local claims", e); } return realm; }
public void exec(AsyncCaller caller, AsyncReturn returnFunction, AuthenticationContext authenticationContext) throws FrameworkException { if (returnFunction == null) { throw new FrameworkException("Can not execute the async process, as no callback function registered on " + "returnFunction."); } AsyncReturn wrappedReturn = (ctx, m, r) -> { this.execReturn(returnFunction, ctx, m, r); }; executorService.submit( new AsyncCallerTask( new ObservingAsyncProcess(caller, wrappedReturn, authenticationContext))); }
private boolean handleInitialize(HttpServletRequest request, HttpServletResponse response, AuthenticationContext context, SequenceConfig sequenceConfig, AuthenticationGraph graph) throws FrameworkException { AuthGraphNode startNode = graph.getStartNode(); if (startNode == null) { throw new FrameworkException("Start node is not set for authentication graph:" + graph.getName()); } context.setCurrentStep(0); return handleNode(request, response, context, sequenceConfig, startNode); }
private boolean handleInitialize(HttpServletRequest request, HttpServletResponse response, AuthenticationContext context, SequenceConfig sequenceConfig, AuthenticationGraph graph) throws FrameworkException { AuthGraphNode startNode = graph.getStartNode(); if (startNode == null) { throw new FrameworkException("Start node is not set for authentication graph:" + graph.getName()); } context.setCurrentStep(0); return handleNode(request, response, context, sequenceConfig, startNode); }
private UserRealm getUserRealm(String tenantDomain) throws FrameworkException { UserRealm realm; try { realm = AnonymousSessionUtil.getRealmByTenantDomain(UserFunctionsServiceHolder.getInstance() .getRegistryService(), UserFunctionsServiceHolder.getInstance().getRealmService(), tenantDomain); } catch (CarbonException e) { throw new FrameworkException( "Error occurred while retrieving the Realm for " + tenantDomain + " to retrieve user roles", e); } return realm; }
private UserRealm getUserRealm(String tenantDomain) throws FrameworkException { UserRealm realm; try { realm = AnonymousSessionUtil.getRealmByTenantDomain(UserFunctionsServiceHolder.getInstance() .getRegistryService(), UserFunctionsServiceHolder.getInstance().getRealmService(), tenantDomain); } catch (CarbonException e) { throw new FrameworkException( "Error occurred while retrieving the Realm for " + tenantDomain + " to retrieve user roles", e); } return realm; }