Skip to content

Commit bbf93a7

Browse files
committed
oops wrong indentation
1 parent 5685f21 commit bbf93a7

1 file changed

Lines changed: 15 additions & 15 deletions

File tree

com/onelogin/saml/Response.java

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -50,24 +50,24 @@ public void loadXmlFromBase64(String response) throws ParserConfigurationExcepti
5050
loadXml(decodedS);
5151
}
5252

53-
public boolean isValid() throws Exception {
54-
NodeList nodes = xmlDoc.getElementsByTagNameNS(XMLSignature.XMLNS, "Signature");
55-
56-
if(nodes==null || nodes.getLength()==0){
57-
throw new Exception("Can't find signature in document.");
58-
}
53+
public boolean isValid() throws Exception {
54+
NodeList nodes = xmlDoc.getElementsByTagNameNS(XMLSignature.XMLNS, "Signature");
5955

60-
if (setIdAttributeExists()) {
61-
tagIdAttributes(xmlDoc);
62-
}
56+
if (nodes == null || nodes.getLength() == 0) {
57+
throw new Exception("Can't find signature in document.");
58+
}
6359

64-
X509Certificate cert = certificate.getX509Cert();
65-
DOMValidateContext ctx = new DOMValidateContext(cert.getPublicKey() , nodes.item(0));
66-
XMLSignatureFactory sigF = XMLSignatureFactory.getInstance("DOM");
67-
XMLSignature xmlSignature = sigF.unmarshalXMLSignature(ctx);
60+
if (setIdAttributeExists()) {
61+
tagIdAttributes(xmlDoc);
62+
}
63+
64+
X509Certificate cert = certificate.getX509Cert();
65+
DOMValidateContext ctx = new DOMValidateContext(cert.getPublicKey(), nodes.item(0));
66+
XMLSignatureFactory sigF = XMLSignatureFactory.getInstance("DOM");
67+
XMLSignature xmlSignature = sigF.unmarshalXMLSignature(ctx);
6868

69-
return xmlSignature.validate(ctx);
70-
}
69+
return xmlSignature.validate(ctx);
70+
}
7171

7272
public String getNameId() throws Exception {
7373
NodeList nodes = xmlDoc.getElementsByTagNameNS("urn:oasis:names:tc:SAML:2.0:assertion", "NameID");

0 commit comments

Comments
 (0)