private Object getAttributeManager() { if (this.handlerConfig == null) { return null; } return this.handlerConfig.getParameter(GeneralConstants.ATTIBUTE_MANAGER); }
public void initChainConfig(SAML2HandlerChainConfig handlerChainConfig) throws ConfigurationException { this.handlerChainConfig = handlerChainConfig; Object config = this.handlerChainConfig.getParameter(GeneralConstants.CONFIGURATION); if(config instanceof IDPType) this.handlerType = HANDLER_TYPE.IDP; else this.handlerType = HANDLER_TYPE.SP; }
protected void initializeHandlerChain() throws ConfigurationException, ProcessingException { populateChainConfig(); SAML2HandlerChainConfig handlerChainConfig = new DefaultSAML2HandlerChainConfig(chainConfigOptions); Set<SAML2Handler> samlHandlers = chain.handlers(); for (SAML2Handler handler : samlHandlers) { handler.initChainConfig(handlerChainConfig); } }
@Override public void generateSAMLRequest(SAML2HandlerRequest request, SAML2HandlerResponse response) throws ProcessingException { if (GENERATE_REQUEST_TYPE.AUTH != request.getTypeOfRequestToBeGenerated()) return; if (getType() == HANDLER_TYPE.IDP) { idp.generateSAMLRequest(request, response); response.setSendRequest(true); } else { sp.generateSAMLRequest(request, response); response.setSendRequest(true); } }
/** * <p> * Indicates if this handler supports the specified {@link SAML2HandlerRequest}. * </p> * * @param request * * @return */ private boolean supportsRequest(SAML2HandlerRequest request) { return getType() == HANDLER_TYPE.IDP && (request.getSAML2Object() instanceof AuthnRequestType); }
public static HttpServletRequest getHttpRequest(SAML2HandlerRequest request) { HTTPContext context = (HTTPContext) request.getContext(); return context.getRequest(); }
protected void initializeHandlerChain() throws ConfigurationException, ProcessingException { populateChainConfig(); SAML2HandlerChainConfig handlerChainConfig = new DefaultSAML2HandlerChainConfig(chainConfigOptions); Set<SAML2Handler> samlHandlers = chain.handlers(); for (SAML2Handler handler : samlHandlers) { handler.initChainConfig(handlerChainConfig); } }
@Override public void generateSAMLRequest(SAML2HandlerRequest request, SAML2HandlerResponse response) throws ProcessingException { if (GENERATE_REQUEST_TYPE.AUTH != request.getTypeOfRequestToBeGenerated()) return; if (getType() == HANDLER_TYPE.IDP) { idp.generateSAMLRequest(request, response); response.setSendRequest(true); } else { sp.generateSAMLRequest(request, response); response.setSendRequest(true); } }
private String getAlgorithm() { String algorithm = (String) handlerConfig.getParameter(GeneralConstants.SAML_ENC_ALGORITHM); if (algorithm == null) { algorithm = "AES"; } return algorithm; }
public void initChainConfig(SAML2HandlerChainConfig handlerChainConfig) throws ConfigurationException { this.handlerChainConfig = handlerChainConfig; Object config = this.handlerChainConfig.getParameter(GeneralConstants.CONFIGURATION); if(config instanceof IDPType) this.handlerType = HANDLER_TYPE.IDP; else this.handlerType = HANDLER_TYPE.SP; }
/** * <p> * Indicates if this handler supports the specified {@link SAML2HandlerRequest}. * </p> * * @param request * @return */ private boolean supportsRequest(SAML2HandlerRequest request) { return getType() == HANDLER_TYPE.IDP && (request.getSAML2Object() instanceof AuthnRequestType); }
public static HttpServletRequest getHttpRequest(SAML2HandlerRequest request) { HTTPContext context = (HTTPContext) request.getContext(); return context.getRequest(); }
private String getAlgorithm() { String algorithm = (String) handlerConfig.getParameter(GeneralConstants.SAML_ENC_ALGORITHM); if (algorithm == null) { algorithm = "AES"; } return algorithm; }
private SPType getSPConfiguration() { SPType spConfiguration = (SPType) handlerChainConfig.getParameter(GeneralConstants.CONFIGURATION); if (spConfiguration == null) { throw logger.samlHandlerServiceProviderConfigNotFound(); } return spConfiguration; } }
private Object getAttributeManager() { if (this.handlerConfig == null) { return null; } return this.handlerConfig.getParameter(GeneralConstants.ATTIBUTE_MANAGER); }
private IDPType getConfiguration() { IDPType configuration = (IDPType) handlerChainConfig.getParameter(GeneralConstants.CONFIGURATION); if (configuration == null) { throw logger.nullArgumentError("IDP Configuration"); } return configuration; }
private Object getAttributeManager() { if (this.handlerConfig == null) { return null; } return this.handlerConfig.getParameter(GeneralConstants.ATTIBUTE_MANAGER); }
private IDPType getConfiguration() { IDPType configuration = (IDPType) handlerChainConfig.getParameter(GeneralConstants.CONFIGURATION); if (configuration == null) { throw logger.nullArgumentError("IDP Configuration"); } return configuration; }
private String getAlgorithm() { String algorithm = (String) handlerConfig.getParameter(GeneralConstants.SAML_ENC_ALGORITHM); if (algorithm == null) { algorithm = "AES"; } return algorithm; }
private SPType getSPConfiguration() { SPType spConfiguration = (SPType) handlerChainConfig.getParameter(GeneralConstants.CONFIGURATION); if (spConfiguration == null) { throw logger.samlHandlerServiceProviderConfigNotFound(); } return spConfiguration; } }