/** * Set the url where the 3rd party authentication service will redirect after authentication * * @param returnURL */ public void setReturnURL(String returnURL) { this.returnURL = StringUtil.getSystemPropertyAsString(returnURL); }
public SamlCredential(final String assertion) { if (StringUtil.isNullOrEmpty(assertion)) throw new IllegalArgumentException(ErrorCodes.NULL_ARGUMENT + "assertion"); this.assertion = assertion; }
protected boolean isLogOutRequest(HTTPContext httpContext) { HttpServletRequest request = httpContext.getRequest(); String gloStr = request.getParameter(GeneralConstants.GLOBAL_LOGOUT); return isNotNull(gloStr) && "true".equalsIgnoreCase(gloStr); }
this.wspAppliesTo = properties.getProperty(WSP_APPLIES_TO); String batchStr = properties.getProperty(IS_BATCH); this.isBatch = StringUtil.isNotNull(batchStr) ? Boolean.parseBoolean(batchStr) : false; this.requestType = properties.getProperty(REQUEST_TYPE); if (!StringUtil.isNullOrEmpty(properties.getProperty(SOAP_BINDING))) { this.soapBinding = properties.getProperty(SOAP_BINDING); .parseInt(properties.getProperty(PicketLinkFederationConstants.ITERATION_COUNT)); try { this.password = StringUtil.decode(password, salt, iterationCount); } catch (Exception e) { throw logger.unableToDecodePasswordError(this.password);
if (StringUtil.isNullOrEmpty(assertionConsumerURL)) if (StringUtil.isNotNull(nameIDFormat))
/** * Given a comma separated string, get the tokens as a {@link List} * * @param str * @return */ public static List<String> tokenize(String str) { return tokenize(str, ","); }
if (StringUtil.isNullOrEmpty(salt)) throw new RuntimeException(ErrorCodes.OPTION_NOT_SET + "Salt"); if (StringUtil.isNullOrEmpty(iCount)) throw new RuntimeException(ErrorCodes.OPTION_NOT_SET + "Iteration Count"); try builder.password(StringUtil.decode(passwordString, salt, iterationCount));
private SAML11AssertionType parseBaseAttributes(StartElement nextElement) throws ParsingException { Attribute idAttribute = nextElement.getAttributeByName(new QName(SAML11Constants.ASSERTIONID)); if (idAttribute == null) throw logger.parserRequiredAttribute("AssertionID"); String id = StaxParserUtil.getAttributeValue(idAttribute); Attribute majVersionAttribute = nextElement.getAttributeByName(new QName(SAML11Constants.MAJOR_VERSION)); String majVersion = StaxParserUtil.getAttributeValue(majVersionAttribute); StringUtil.match("1", majVersion); Attribute minVersionAttribute = nextElement.getAttributeByName(new QName(SAML11Constants.MINOR_VERSION)); String minVersion = StaxParserUtil.getAttributeValue(minVersionAttribute); StringUtil.match("1", minVersion); Attribute issueInstantAttribute = nextElement.getAttributeByName(new QName(JBossSAMLConstants.ISSUE_INSTANT.get())); XMLGregorianCalendar issueInstant = XMLTimeUtil.parse(StaxParserUtil.getAttributeValue(issueInstantAttribute)); return new SAML11AssertionType(id, issueInstant); } }
protected boolean isLogOutRequest(HTTPContext httpContext) { HttpServletRequest request = httpContext.getRequest(); String gloStr = request.getParameter(GeneralConstants.GLOBAL_LOGOUT); return isNotNull(gloStr) && "true".equalsIgnoreCase(gloStr); } }
if (StringUtil.isNullOrEmpty(assertionConsumerURL)) if (StringUtil.isNotNull(nameIDFormat))
/** * Given a comma separated string, get the tokens as a {@link List} * @param str * @return */ public static List<String> tokenize(String str) { return tokenize(str, ","); }
if (StringUtil.isNullOrEmpty(salt)) throw new RuntimeException(ErrorCodes.OPTION_NOT_SET + "Salt"); if (StringUtil.isNullOrEmpty(iCount)) throw new RuntimeException(ErrorCodes.OPTION_NOT_SET + "Iteration Count"); try builder.password(StringUtil.decode(passwordString, salt, iterationCount));
private SAML11AssertionType parseBaseAttributes(StartElement nextElement) throws ParsingException { Attribute idAttribute = nextElement.getAttributeByName(new QName(SAML11Constants.ASSERTIONID)); if (idAttribute == null) throw new ParsingException(REQD_ATTRIBUTE + "AssertionID"); String id = StaxParserUtil.getAttributeValue(idAttribute); Attribute majVersionAttribute = nextElement.getAttributeByName(new QName(SAML11Constants.MAJOR_VERSION)); String majVersion = StaxParserUtil.getAttributeValue(majVersionAttribute); StringUtil.match("1", majVersion); Attribute minVersionAttribute = nextElement.getAttributeByName(new QName(SAML11Constants.MINOR_VERSION)); String minVersion = StaxParserUtil.getAttributeValue(minVersionAttribute); StringUtil.match("1", minVersion); Attribute issueInstantAttribute = nextElement .getAttributeByName(new QName(JBossSAMLConstants.ISSUE_INSTANT.get())); XMLGregorianCalendar issueInstant = XMLTimeUtil.parse(StaxParserUtil.getAttributeValue(issueInstantAttribute)); return new SAML11AssertionType(id, issueInstant); } }
protected boolean isLogOutRequest(HTTPContext httpContext) { HttpServletRequest request = httpContext.getRequest(); String gloStr = request.getParameter(GeneralConstants.GLOBAL_LOGOUT); return isNotNull(gloStr) && "true".equalsIgnoreCase(gloStr); } }
if (StringUtil.isNullOrEmpty(assertionConsumerURL)) { assertionConsumerURL = issuerValue; if (StringUtil.isNotNull(nameIDFormat)) { samlRequest.setNameIDFormat(nameIDFormat);
public SamlCredential(final String assertion) { if (StringUtil.isNullOrEmpty(assertion)) throw new IllegalArgumentException(ErrorCodes.NULL_ARGUMENT + "assertion"); this.assertion = assertion; }