/** * Adds a post authentication handler. * * @param postAuthenticationHandler Post authentication handler implementation. */ public void addPostAuthenticationHandler(PostAuthenticationHandler postAuthenticationHandler) { synchronized (postAuthenticationHandlers) { this.postAuthenticationHandlers.add(postAuthenticationHandler); postAuthenticationHandlers.sort(new HandlerComparator()); } }
/** * Adds a post authentication handler. * * @param postAuthenticationHandler Post authentication handler implementation. */ public void addPostAuthenticationHandler(PostAuthenticationHandler postAuthenticationHandler) { synchronized (postAuthenticationHandlers) { this.postAuthenticationHandlers.add(postAuthenticationHandler); postAuthenticationHandlers.sort(new HandlerComparator()); } }
public static void addAuthenticationHandler(OAuthClientAuthenticator clientAuthenticator) { authenticationHandlers.add(clientAuthenticator); authenticationHandlers.sort(new HandlerComparator()); }
protected void addResourceHandler(ResourceHandler resourceHandler) { if ( log.isDebugEnabled() ) { log.debug("ResourceHandler acquired"); } List<ResourceHandler> resourceHandlers = AuthenticationServiceHolder.getInstance().getResourceHandlers(); resourceHandlers.add(resourceHandler); Collections.sort(resourceHandlers, new HandlerComparator()); }
protected void setResourceHandler(ResourceHandler resourceHandler) { if ( log.isDebugEnabled() ) { log.debug("ResourceHandler acquired"); } List<ResourceHandler> resourceHandlerList = AuthorizationServiceHolder.getInstance().getResourceHandlerList(); resourceHandlerList.add(resourceHandler); Collections.sort(resourceHandlerList, new HandlerComparator()); }
protected void addResourceHandler(ResourceHandler resourceHandler) { if ( log.isDebugEnabled() ) { log.debug("ResourceHandler acquired"); } List<ResourceHandler> resourceHandlers = AuthenticationServiceHolder.getInstance().getResourceHandlers(); resourceHandlers.add(resourceHandler); Collections.sort(resourceHandlers, new HandlerComparator()); }
protected void setResourceHandler(ResourceHandler resourceHandler) { if ( log.isDebugEnabled() ) { log.debug("ResourceHandler acquired"); } List<ResourceHandler> resourceHandlerList = AuthorizationServiceHolder.getInstance().getResourceHandlerList(); resourceHandlerList.add(resourceHandler); Collections.sort(resourceHandlerList, new HandlerComparator()); }
protected void setAuthorizationHandler(AuthorizationHandler authorizationHandler) { if ( log.isDebugEnabled() ) { log.debug("AuthorizationHandler acquired"); } List<AuthorizationHandler> authorizationHandlerList = AuthorizationServiceHolder.getInstance().getAuthorizationHandlerList(); authorizationHandlerList.add(authorizationHandler); Collections.sort(authorizationHandlerList, new HandlerComparator()); }
protected void setAuthorizationHandler(AuthorizationHandler authorizationHandler) { if ( log.isDebugEnabled() ) { log.debug("AuthorizationHandler acquired"); } List<AuthorizationHandler> authorizationHandlerList = AuthorizationServiceHolder.getInstance().getAuthorizationHandlerList(); authorizationHandlerList.add(authorizationHandler); Collections.sort(authorizationHandlerList, new HandlerComparator()); }
protected void setAuthorizationManager(AuthorizationManager authorizationManager) { if ( log.isDebugEnabled() ) { log.debug("AuthorizationManager acquired"); } List<AuthorizationManager> authorizationManagerList = AuthorizationValveServiceHolder.getInstance().getAuthorizationManagerList(); authorizationManagerList.add(authorizationManager); sort(authorizationManagerList,new HandlerComparator()); }
protected void setAuthenticationManager(AuthenticationManager authenticationManager) { if (log.isDebugEnabled()) { log.debug("Set AuthenticationManager, " + authenticationManager != null ? authenticationManager .getName() : " Unknown"); } List<AuthenticationManager> authenticationManagers = AuthenticationValveServiceHolder.getInstance() .getAuthenticationManagers(); authenticationManagers.add(authenticationManager); sort(authenticationManagers, new HandlerComparator()); }
/** * Sort and filter enabled handlers. * * @param identityHandlers * @param isEnableHandlersOnly * @return List<IdentityHandler> */ public <T extends IdentityHandler> List<T> sortHandlers(List<T> identityHandlers, boolean isEnableHandlersOnly) { if (log.isDebugEnabled()) { log.debug("Sort the handler list."); } if (identityHandlers == null || identityHandlers.isEmpty()) { return new ArrayList<T>(); } List<T> identityHandlersList = identityHandlers; sort(identityHandlersList, new HandlerComparator()); if (isEnableHandlersOnly) { identityHandlersList = new ArrayList<>(); for (IdentityHandler identityHandler : identityHandlers) { if (identityHandler.isEnabled()) { identityHandlersList.add((T) identityHandler); } } } return identityHandlersList; }
/** * Sort and filter enabled handlers. * * @param identityHandlers * @param isEnableHandlersOnly * @return List<IdentityHandler> */ public <T extends IdentityHandler> List<T> sortHandlers(List<T> identityHandlers, boolean isEnableHandlersOnly) { if (log.isDebugEnabled()) { log.debug("Sort the handler list."); } if (identityHandlers == null || identityHandlers.isEmpty()) { return new ArrayList<T>(); } List<T> identityHandlersList = identityHandlers; sort(identityHandlersList, new HandlerComparator()); if (isEnableHandlersOnly) { identityHandlersList = new ArrayList<>(); for (IdentityHandler identityHandler : identityHandlers) { if (identityHandler.isEnabled()) { identityHandlersList.add((T) identityHandler); } } } return identityHandlersList; }
/** * Sort and filter enabled handlers. * * @param identityHandlers * @param isEnableHandlersOnly * @return List<IdentityHandler> */ public <T extends IdentityHandler> List<T> sortHandlers(List<T> identityHandlers, boolean isEnableHandlersOnly) { if(log.isDebugEnabled()){ log.debug("Sort the handler list."); } if(identityHandlers == null || identityHandlers.isEmpty()){ return new ArrayList<T>() ; } List<T> identityHandlersList = identityHandlers; sort(identityHandlersList, new HandlerComparator()); if (isEnableHandlersOnly) { identityHandlersList = new ArrayList<>(); for (IdentityHandler identityHandler : identityHandlers) { if (identityHandler.isEnabled()) { identityHandlersList.add((T)identityHandler); } } } return identityHandlersList; }
/** * Sort and filter enabled handlers. * * @param identityHandlers * @param isEnableHandlersOnly * @return List<IdentityHandler> */ public <T extends IdentityHandler> List<T> sortHandlers(List<T> identityHandlers, boolean isEnableHandlersOnly) { if(log.isDebugEnabled()){ log.debug("Sort the handler list."); } if(identityHandlers == null || identityHandlers.isEmpty()){ return new ArrayList<T>() ; } List<T> identityHandlersList = identityHandlers; sort(identityHandlersList, new HandlerComparator()); if (isEnableHandlersOnly) { identityHandlersList = new ArrayList<>(); for (IdentityHandler identityHandler : identityHandlers) { if (identityHandler.isEnabled()) { identityHandlersList.add((T)identityHandler); } } } return identityHandlersList; }
sort(identityHandlers, new HandlerComparator());
sort(identityHandlers, new HandlerComparator());
@Reference( name = "identity.processor", service = org.wso2.carbon.identity.application.authentication.framework.inbound.IdentityProcessor.class, cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, unbind = "removeIdentityProcessor" ) protected void addIdentityProcessor(IdentityProcessor requestProcessor) { FrameworkServiceDataHolder.getInstance().getIdentityProcessors().add(requestProcessor); Collections.sort(FrameworkServiceDataHolder.getInstance().getIdentityProcessors(), new HandlerComparator()); Collections.reverse(FrameworkServiceDataHolder.getInstance().getIdentityProcessors()); if (log.isDebugEnabled()) { log.debug("Added IdentityProcessor : " + requestProcessor.getName()); } }
@Reference( name = "identity.response.factory", service = HttpIdentityResponseFactory.class, cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, unbind = "removeHttpIdentityResponseFactory" ) protected void addHttpIdentityResponseFactory(HttpIdentityResponseFactory factory) { FrameworkServiceDataHolder.getInstance().getHttpIdentityResponseFactories().add(factory); Collections.sort(FrameworkServiceDataHolder.getInstance().getHttpIdentityResponseFactories(), new HandlerComparator()); Collections.reverse(FrameworkServiceDataHolder.getInstance().getHttpIdentityResponseFactories()); if (log.isDebugEnabled()) { log.debug("Added HttpIdentityResponseFactory : " + factory.getName()); } }
@Reference( name = "identity.processor", service = IdentityProcessor.class, cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, unbind = "removeIdentityProcessor" ) protected void addIdentityProcessor(IdentityProcessor requestProcessor) { FrameworkServiceDataHolder.getInstance().getIdentityProcessors().add(requestProcessor); Collections.sort(FrameworkServiceDataHolder.getInstance().getIdentityProcessors(), new HandlerComparator()); Collections.reverse(FrameworkServiceDataHolder.getInstance().getIdentityProcessors()); if (log.isDebugEnabled()) { log.debug("Added IdentityProcessor : " + requestProcessor.getName()); } }