/** * 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()); }
@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()); } }
@Reference( name = "identity.request.factory", service = org.wso2.carbon.identity.application.authentication.framework.inbound.HttpIdentityRequestFactory.class, cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, unbind = "removeHttpIdentityRequestFactory" ) protected void addHttpIdentityRequestFactory(HttpIdentityRequestFactory factory) { FrameworkServiceDataHolder.getInstance().getHttpIdentityRequestFactories().add(factory); Collections.sort(FrameworkServiceDataHolder.getInstance().getHttpIdentityRequestFactories(), new HandlerComparator()); Collections.reverse(FrameworkServiceDataHolder.getInstance().getIdentityProcessors()); if (log.isDebugEnabled()) { log.debug("Added HttpIdentityRequestFactory : " + factory.getName()); } }
@Reference( name = "identity.response.factory", service = org.wso2.carbon.identity.application.authentication.framework.inbound.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().getIdentityProcessors()); if (log.isDebugEnabled()) { log.debug("Added HttpIdentityResponseFactory : " + factory.getName()); } }
@Reference( name = "identity.request.factory", service = HttpIdentityRequestFactory.class, cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, unbind = "removeHttpIdentityRequestFactory" ) protected void addHttpIdentityRequestFactory(HttpIdentityRequestFactory factory) { FrameworkServiceDataHolder.getInstance().getHttpIdentityRequestFactories().add(factory); Collections.sort(FrameworkServiceDataHolder.getInstance().getHttpIdentityRequestFactories(), new HandlerComparator()); Collections.reverse(FrameworkServiceDataHolder.getInstance().getHttpIdentityRequestFactories()); if (log.isDebugEnabled()) { log.debug("Added HttpIdentityRequestFactory : " + factory.getName()); } }
@Reference( name = "identity.request.factory", service = HttpIdentityRequestFactory.class, cardinality = ReferenceCardinality.MULTIPLE, policy = ReferencePolicy.DYNAMIC, unbind = "removeHttpIdentityRequestFactory" ) protected void addHttpIdentityRequestFactory(HttpIdentityRequestFactory factory) { FrameworkServiceDataHolder.getInstance().getHttpIdentityRequestFactories().add(factory); Collections.sort(FrameworkServiceDataHolder.getInstance().getHttpIdentityRequestFactories(), new HandlerComparator()); Collections.reverse(FrameworkServiceDataHolder.getInstance().getHttpIdentityRequestFactories()); if (log.isDebugEnabled()) { log.debug("Added HttpIdentityRequestFactory : " + factory.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()); } }
public boolean validateRequest(SAMLMessageContext messageContext) throws FrameworkException { List<SAMLValidator> validators = IdentitySAMLSSOServiceComponentHolder.getInstance().getSamlValidators(); Collections.sort(validators, new HandlerComparator()); for (SAMLValidator reqvalidator : validators) { if (reqvalidator.canHandle(messageContext)) { try { return reqvalidator.validateRequest(messageContext); } catch (IdentityException | IOException e) { throw new SAML2Exception("Authentication Request Validation Failed.", e); } } } throw SAMLRuntimeException.error("Cannot find SAML Request validator to validate this request"); }