/** * Get the created timestamp. * * @return the data from the created time element. */ public String getCreated() { return XMLUtils.getElementText(elementCreated); }
/** * Get the user name. * * @return the data from the user name element. */ public String getName() { return XMLUtils.getElementText(elementUsername); }
/** * Get the nonce. * * @return the data from the nonce element. */ public String getNonce() { return XMLUtils.getElementText(elementNonce); }
/** * Gets the password string. This is the password as it is in the password * element of a username token. Thus it can be either plain text or the * password digest value. * * @return the password string or <code>null</code> if no such node exists. */ public String getPassword() { String password = XMLUtils.getElementText(elementPassword); // See WSS-219 if (password == null && elementPassword != null) { return ""; } return password; }
/** * Get the Iteration value of this UsernameToken. * * @return Returns the Iteration value. If no Iteration was specified in the * username token the default value according to the specification * is returned. */ public int getIteration() { String iter = XMLUtils.getElementText(elementIteration); if (iter != null) { return Integer.parseInt(iter); } return DEFAULT_ITERATION; }
/** * Get the Salt value of this UsernameToken. * * @return Returns the binary Salt value or <code>null</code> if no Salt * value is available in the username token. * @throws WSSecurityException */ public byte[] getSalt() throws WSSecurityException { String salt = XMLUtils.getElementText(elementSalt); if (salt != null) { return org.apache.xml.security.utils.XMLUtils.decode(salt); } return null; }
/** * Method getDecodedBase64EncodedData * * @param element * @return a byte array containing the decoded data * @throws WSSecurityException */ public static byte[] getDecodedBase64EncodedData(Element element) throws WSSecurityException { String text = XMLUtils.getElementText(element); if (text == null) { return null; } return org.apache.xml.security.utils.XMLUtils.decode(text); } }
/** * get the byte array containing token information. * * @return the byte array containing token information */ public byte[] getToken() { if (data != null) { return data; } String text = XMLUtils.getElementText(element); if (text == null) { return null; } return org.apache.xml.security.utils.XMLUtils.decode(text); }
/** * Constructor. */ public DOMX509IssuerSerial(Element issuerSerialElement) { element = issuerSerialElement; Element issuerNameElement = XMLUtils.getDirectChildElement(element, "X509IssuerName", WSS4JConstants.SIG_NS); issuer = XMLUtils.getElementText(issuerNameElement); Element serialNumberElement = XMLUtils.getDirectChildElement(element, "X509SerialNumber", WSS4JConstants.SIG_NS); String serialNumberStr = XMLUtils.getElementText(serialNumberElement); if (serialNumberStr != null) { serialNumber = new BigInteger(serialNumberStr); } else { serialNumber = null; } }
public String getKeyIdentifierValue() { if (containsKeyIdentifier()) { return XMLUtils.getElementText(getFirstElement()); } return null; }
XMLUtils.getDirectChildElement(token, WSS4JConstants.USERNAME_LN, WSS4JConstants.WSSE_NS); if (usernameElement != null) { return XMLUtils.getElementText(usernameElement); String text = XMLUtils.getElementText(token); if (text != null && !"".equals(text)) { try {
public byte[] getSKIBytes() { if (skiBytes != null) { return skiBytes; } String text = XMLUtils.getElementText(getFirstElement()); if (text != null) { skiBytes = org.apache.xml.security.utils.XMLUtils.decode(text); } return skiBytes; }
XMLUtils.getDirectChildElement(token, WSS4JConstants.USERNAME_LN, WSS4JConstants.WSSE_NS); if (usernameElement != null) { return XMLUtils.getElementText(usernameElement); String text = XMLUtils.getElementText(token); if (text != null && !"".equals(text)) { try {
); if (keyNmElem != null) { keyName = XMLUtils.getElementText(keyNmElem);
String text = XMLUtils.getElementText(getFirstElement()); if (text != null) { byte[] thumb = org.apache.xml.security.utils.XMLUtils.decode(text);
String iter = XMLUtils.getElementText(elementIteration); if (iter == null || Integer.parseInt(iter) < 1000) { bspEnforcer.handleBSPRule(BSPRule.R4218);
String iter = XMLUtils.getElementText(elementIteration); if (iter != null) { int iterInt = Integer.parseInt(iter);
String text = XMLUtils.getElementText(secToken.getToken()); if (text != null) { data = org.apache.xml.security.utils.XMLUtils.decode(text);
String text = XMLUtils.getElementText(secToken.getToken()); if (text != null) { data = org.apache.xml.security.utils.XMLUtils.decode(text);