/** * A method to create a Principal from a SAML Assertion * @param assertion An AssertionWrapper object * @return A principal */ private Principal createPrincipalFromSAML( AssertionWrapper assertion ) { SAMLTokenPrincipal samlPrincipal = new SAMLTokenPrincipal(assertion); String confirmMethod = null; List<String> methods = assertion.getConfirmationMethods(); if (methods != null && methods.size() > 0) { confirmMethod = methods.get(0); } if (OpenSAMLUtil.isMethodHolderOfKey(confirmMethod) && assertion.isSigned()) { trustedCredential = true; } return samlPrincipal; }
/** * A method to create a Principal from a SAML Assertion * @param assertion An AssertionWrapper object * @return A principal */ private Principal createPrincipalFromSAML( AssertionWrapper assertion ) { SAMLTokenPrincipal samlPrincipal = new SAMLTokenPrincipal(assertion); String confirmMethod = null; List<String> methods = assertion.getConfirmationMethods(); if (methods != null && methods.size() > 0) { confirmMethod = methods.get(0); } if (OpenSAMLUtil.isMethodHolderOfKey(confirmMethod) && assertion.isSigned()) { trustedCredential = true; } return samlPrincipal; }
) throws WSSecurityException { List<String> methods = samlAssertion.getConfirmationMethods(); if (methods == null || methods.isEmpty()) { if (requiredSubjectConfirmationMethod != null) {
) throws WSSecurityException { List<String> methods = samlAssertion.getConfirmationMethods(); if (methods == null || methods.isEmpty()) { if (requiredSubjectConfirmationMethod != null) {
/** * This method parses the KeyInfo of the Subject for the holder-of-key confirmation * method, as required by the SAML Token spec. It then stores the SAMLKeyInfo object that * has been obtained for future processing by the SignatureProcessor. * @throws WSSecurityException */ public void parseHOKSubject( RequestData data, WSDocInfo docInfo ) throws WSSecurityException { String confirmMethod = null; List<String> methods = getConfirmationMethods(); if (methods != null && methods.size() > 0) { confirmMethod = methods.get(0); } if (OpenSAMLUtil.isMethodHolderOfKey(confirmMethod)) { if (saml1 != null) { subjectKeyInfo = SAMLUtil.getCredentialFromSubject(saml1, data, docInfo, data.getWssConfig().isWsiBSPCompliant()); } else if (saml2 != null) { subjectKeyInfo = SAMLUtil.getCredentialFromSubject(saml2, data, docInfo, data.getWssConfig().isWsiBSPCompliant()); } } }
/** * This method parses the KeyInfo of the Subject for the holder-of-key confirmation * method, as required by the SAML Token spec. It then stores the SAMLKeyInfo object that * has been obtained for future processing by the SignatureProcessor. * @throws WSSecurityException */ public void parseHOKSubject( RequestData data, WSDocInfo docInfo ) throws WSSecurityException { String confirmMethod = null; List<String> methods = getConfirmationMethods(); if (methods != null && methods.size() > 0) { confirmMethod = methods.get(0); } if (OpenSAMLUtil.isMethodHolderOfKey(confirmMethod)) { if (saml1 != null) { subjectKeyInfo = SAMLUtil.getCredentialFromSubject(saml1, data, docInfo, data.getWssConfig().isWsiBSPCompliant()); } else if (saml2 != null) { subjectKeyInfo = SAMLUtil.getCredentialFromSubject(saml2, data, docInfo, data.getWssConfig().isWsiBSPCompliant()); } } }
List<String> methods = assertion.getConfirmationMethods(); if (methods != null && methods.size() > 0) { confirmMethod = methods.get(0);
List<String> methods = assertion.getConfirmationMethods(); if (methods != null && methods.size() > 0) { confirmMethod = methods.get(0);