protected boolean isLogOutRequest(HTTPContext httpContext) { HttpServletRequest request = httpContext.getRequest(); String gloStr = request.getParameter(GeneralConstants.GLOBAL_LOGOUT); return isNotNull(gloStr) && "true".equalsIgnoreCase(gloStr); }
protected boolean isLogOutRequest(HTTPContext httpContext) { HttpServletRequest request = httpContext.getRequest(); String gloStr = request.getParameter(GeneralConstants.GLOBAL_LOGOUT); return isNotNull(gloStr) && "true".equalsIgnoreCase(gloStr); } }
private List<String> getHeaderNames(String str) { List<String> list = new ArrayList<String>(); if(StringUtil.isNotNull(str)) { list.addAll(StringUtil.tokenize(str)); } return list; } }
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; } }
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; } }
protected boolean isLogOutRequest(HTTPContext httpContext) { HttpServletRequest request = httpContext.getRequest(); 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); } } }
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; } }
private void determineServiceUrl(String service) { openIdServiceUrl = Providers.GOOGLE.get(); if (StringUtil.isNotNull(service)) { if ("google".equals(service)) openIdServiceUrl = Providers.GOOGLE.get(); else if ("yahoo".equals(service)) openIdServiceUrl = Providers.YAHOO.get(); else if ("myspace".equals(service)) openIdServiceUrl = Providers.MYSPACE.get(); else if ("myopenid".equals(service)) openIdServiceUrl = Providers.MYOPENID.get(); } } }
private void determineServiceUrl(String service) { openIdServiceUrl = Providers.GOOGLE.get(); if (StringUtil.isNotNull(service)) { if ("google".equals(service)) openIdServiceUrl = Providers.GOOGLE.get(); else if ("yahoo".equals(service)) openIdServiceUrl = Providers.YAHOO.get(); else if ("myspace".equals(service)) openIdServiceUrl = Providers.MYSPACE.get(); else if ("myopenid".equals(service)) openIdServiceUrl = Providers.MYOPENID.get(); } } }
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); }
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); }
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); }
/** * Import values from another {@link IDPType} * * @param other */ public void importFrom(IDPType other) { super.importFrom(other); String attributeManager = other.getAttributeManager(); if (StringUtil.isNotNull(attributeManager)) { setAttributeManager(attributeManager); } encrypt = other.isEncrypt(); if (StringUtil.isNotNull(other.getRoleGenerator())) { this.roleGenerator = other.getRoleGenerator(); } }
public void write(SAML11SubjectLocalityType locality) throws ProcessingException { StaxUtil.writeStartElement(writer, ASSERTION_PREFIX, JBossSAMLConstants.SUBJECT_LOCALITY.get(), SAML11Constants.ASSERTION_11_NSURI); String ip = locality.getIpAddress(); if (StringUtil.isNotNull(ip)) { StaxUtil.writeAttribute(writer, SAML11Constants.IP_ADDRESS, ip); } String dns = locality.getDnsAddress(); if (StringUtil.isNotNull(dns)) { StaxUtil.writeAttribute(writer, SAML11Constants.DNS_ADDRESS, dns); } 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; }
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; }
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; }
public void write(SAML11SubjectLocalityType locality) throws ProcessingException { StaxUtil.writeStartElement(writer, ASSERTION_PREFIX, JBossSAMLConstants.SUBJECT_LOCALITY.get(), SAML11Constants.ASSERTION_11_NSURI); String ip = locality.getIpAddress(); if (StringUtil.isNotNull(ip)) { StaxUtil.writeAttribute(writer, SAML11Constants.IP_ADDRESS, ip); } String dns = locality.getDnsAddress(); if (StringUtil.isNotNull(dns)) { StaxUtil.writeAttribute(writer, SAML11Constants.DNS_ADDRESS, dns); } StaxUtil.writeEndElement(writer); }
public void write(SAML11NameIdentifierType nameid) throws ProcessingException { StaxUtil.writeStartElement(writer, ASSERTION_PREFIX, SAML11Constants.NAME_IDENTIFIER, SAML11Constants.ASSERTION_11_NSURI); URI format = nameid.getFormat(); if (format != null) { StaxUtil.writeAttribute(writer, SAML11Constants.FORMAT, format.toString()); } String nameQualifier = nameid.getNameQualifier(); if (StringUtil.isNotNull(nameQualifier)) { StaxUtil.writeAttribute(writer, SAML11Constants.NAME_QUALIFIER, nameQualifier); } StaxUtil.writeCharacters(writer, nameid.getValue()); StaxUtil.writeEndElement(writer); StaxUtil.flush(writer); }