/** * Set the Timer Value to reload the configuration * * @param value an integer value that represents timer value (in miliseconds) */ public void setTimerInterval(String value) { if (StringUtil.isNotNull(value)) { timerInterval = Integer.parseInt(value); } }
/** * Set the Timer Value to reload the configuration * * @param value an integer value that represents timer value (in miliseconds) */ public void setTimerInterval(String value) { if (StringUtil.isNotNull(value)) { timerInterval = Integer.parseInt(value); } }
/** * Verify whether a {@link HttpServletRequest} is for Local Logout * @param request * @return */ public boolean isLocalLogoutRequest(HttpServletRequest request){ String lloStr = request.getParameter(GeneralConstants.LOCAL_LOGOUT); return isNotNull(lloStr) && "true".equalsIgnoreCase(lloStr); }
/** * <p> * Indicates if the current request is a GlobalLogout request. * </p> * * @param request * @return */ public boolean isGlobalLogout(HttpServletRequest request) { String gloStr = request.getParameter(GeneralConstants.GLOBAL_LOGOUT); return isNotNull(gloStr) && "true".equalsIgnoreCase(gloStr); }
@Override public void init(ServletConfig config) throws ServletException { super.init(config); String cstr = config.getInitParameter("configProvider"); if (isNotNull(cstr)) { try { configProvider = (IMetadataConfigurationStore) SecurityActions.loadClass(getClass(), cstr).newInstance(); } catch (Exception e) { throw new ServletException(e); } } }
/** * <p> Indicates if the current request is a GlobalLogout request. </p> * * @param request * * @return */ private boolean isGlobalLogout(Request request) { String gloStr = request.getParameter(GeneralConstants.GLOBAL_LOGOUT); return isNotNull(gloStr) && "true".equalsIgnoreCase(gloStr); }
public List<String> generateRoles(Principal principal) { List<String> roles = new ArrayList<String>(); String csv = (String) props.get(principal.getName()); if (StringUtil.isNotNull(csv)) { roles.addAll(StringUtil.tokenize(csv)); } return roles; } }
@Override public void init(ServletConfig config) throws ServletException { super.init(config); String cstr = config.getInitParameter("configProvider"); if (isNotNull(cstr)) { try { configProvider = (IMetadataConfigurationStore) SecurityActions.loadClass(getClass(), cstr).newInstance(); } catch (Exception e) { throw new ServletException(e); } } }
protected boolean isLogOutRequest(HTTPContext httpContext) { HttpServletRequest request = httpContext.getRequest(); String gloStr = request.getParameter(GeneralConstants.GLOBAL_LOGOUT); return isNotNull(gloStr) && "true".equalsIgnoreCase(gloStr); }
public List<String> generateRoles(Principal principal) { List<String> roles = new ArrayList<String>(); String csv = (String) props.get(principal.getName()); if (StringUtil.isNotNull(csv)) { roles.addAll(StringUtil.tokenize(csv)); } return roles; } }
/** * <p> * Checks if the given {@link javax.servlet.http.HttpServletRequest} containes a SAML11 Target parameter. Usually this indicates that the given request is * a SAML11 request. * </p> * * @param request * @return */ private boolean hasSAML11Target(HttpServletRequest request) { return isNotNull(request.getParameter(JBossSAMLConstants.UNSOLICITED_RESPONSE_TARGET.get())); }
/** * <p> * Checks if the given {@link javax.servlet.http.HttpServletRequest} containes a SAML11 Target parameter. Usually this indicates that the given request is * a SAML11 request. * </p> * * @param request * @return */ private boolean hasSAML11Target(HttpServletRequest request) { return isNotNull(request.getParameter(JBossSAMLConstants.UNSOLICITED_RESPONSE_TARGET.get())); }
@Override public void initialize(Subject subject, CallbackHandler callbackHandler, Map<String, ?> sharedState, Map<String, ?> options) { super.initialize(subject, callbackHandler, sharedState, options); String groupNameStr = (String) options.get("groupPrincipalName"); if (StringUtil.isNotNull(groupNameStr)) { groupName = groupNameStr.trim(); } }
/** * <p> Indicates if the current request is a LocalLogout request. </p> * * @param request * * @return */ private boolean isLocalLogout(Request request) { String lloStr = request.getParameter(GeneralConstants.LOCAL_LOGOUT); return isNotNull(lloStr) && "true".equalsIgnoreCase(lloStr); }
public void setAttributeList(String attribList) { if (StringUtil.isNotNull(attribList)) { this.attributeKeys.clear(); this.attributeKeys.addAll(StringUtil.tokenize(attribList)); } }
private List<String> getHeaderNames(String str) { List<String> list = new ArrayList<String>(); if (StringUtil.isNotNull(str)) { list.addAll(StringUtil.tokenize(str)); } return list; } }
/** * <p> Checks if the given {@link Request} containes a SAML11 Target parameter. Usually this indicates that the given request is * a SAML11 request. </p> * * @param request * * @return */ private boolean isUnsolicitedResponse(Request request) { return isNotNull(request.getParameter(JBossSAMLConstants.UNSOLICITED_RESPONSE_TARGET.get())); }
protected String determineLoginType(boolean isSecure) { String result = JBossSAMLURIConstants.AC_PASSWORD.get(); if (authMethod != null) { if (StringUtil.isNotNull(authMethod)) { if ("CLIENT-CERT".equals(authMethod)) result = JBossSAMLURIConstants.AC_TLS_CLIENT.get(); else if (isSecure) result = JBossSAMLURIConstants.AC_PASSWORD_PROTECTED_TRANSPORT.get(); } } return result; }
public void write(SAML11ActionType action) throws ProcessingException { StaxUtil.writeStartElement(writer, ASSERTION_PREFIX, SAML11Constants.ACTION, ns); String ns = action.getNamespace(); if (StringUtil.isNotNull(ns)) { StaxUtil.writeAttribute(writer, SAML11Constants.NAMESPACE, ns); } String val = action.getValue(); if (StringUtil.isNotNull(val)) { StaxUtil.writeCharacters(writer, val); } StaxUtil.writeEndElement(writer); }
private RequestSecurityToken setAppliesTo(String endpointURI, RequestSecurityToken rst) { if (StringUtil.isNotNull(wspAppliesTo)) { rst.setAppliesTo(WSTrustUtil.createAppliesTo(wspAppliesTo)); } else if (endpointURI != null) rst.setAppliesTo(WSTrustUtil.createAppliesTo(endpointURI)); return rst; }