private OMElement getHeaderBlock(OMElement soapHeader, QName keyQName) { if (soapHeader != null) { return soapHeader.getFirstChildWithName(keyQName); } return null; } }
private boolean processCancelResponse(OMElement response) { /* <wst:RequestSecurityTokenResponse> <wst:RequestedTokenCancelled/> </wst:RequestSecurityTokenResponse> */ return response. getFirstChildWithName(new QName(RahasConstants. CancelBindingLocalNames.REQUESTED_TOKEN_CANCELED)) != null; }
public OMElement getEndpointReference() { OMElement epr = data.getFirstChildWithName(new QName( DRConstants.SERVICE_DATA.ENDPOINT_REFERENCE)); return epr; }
public String getURL() { String urlValue = null; OMElement url = data.getFirstChildWithName(new QName( DRConstants.SERVICE_DATA.URL)); if (url != null) { urlValue = url.getText(); } return urlValue; }
protected String getValue(OMElement elt, QName qName) { OMElement e = elt.getFirstChildWithName(qName); if (e != null) { return e.getText(); } else { handleException("Unable to read configuration value for : " + qName); } return null; }
/** * Returns the element with the provided local part * * @param localPart local part name * @return Corresponding OMElement */ public OMElement getConfigElement(String localPart) { return rootElement.getFirstChildWithName( IdentityApplicationManagementUtil.getQNameWithIdentityApplicationNS(localPart)); }
void initializeConfigs(OMElement mappingsElement) { if (mappingsElement == null) { return; } if (mappingsElement.getLocalName().equals("Server")) { mappingsElement = mappingsElement.getFirstChildWithName(AUTH_CTX_QNAME); } OMElement amrRefsElement = mappingsElement.getFirstChildWithName(AMR_MAPPING_QNAME); if (amrRefsElement != null) { processAmrMappings(amrRefsElement); } }
private void parseMapFederatedUsersToLocalConfiguration(OMElement oauthConfigElem) { OMElement mapFederatedUsersToLocalConfigElem = oauthConfigElem.getFirstChildWithName(getQNameWithIdentityNS( ConfigElements.MAP_FED_USERS_TO_LOCAL)); if (mapFederatedUsersToLocalConfigElem != null) { mapFederatedUsersToLocal = Boolean.parseBoolean(mapFederatedUsersToLocalConfigElem.getText()); } if (log.isDebugEnabled()) { log.debug("MapFederatedUsersToLocal was set to : " + mapFederatedUsersToLocal); } }
private void parseClientIdValidationRegex(OMElement oauthConfigElem) { OMElement clientIdValidationRegexConfigElem = oauthConfigElem .getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.CLIENT_ID_VALIDATE_REGEX)); if (clientIdValidationRegexConfigElem != null && !"".equals(clientIdValidationRegexConfigElem.getText().trim())) { clientIdValidationRegex = clientIdValidationRegexConfigElem.getText().trim(); } if (log.isDebugEnabled()) { log.debug("Client id validation regex is set to: " + clientIdValidationRegex); } }
private void parseImplicitErrorFragment(OMElement oauthConfigElem) { OMElement implicitErrorFragmentElem = oauthConfigElem.getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.IMPLICIT_ERROR_FRAGMENT)); if (implicitErrorFragmentElem != null) { isImplicitErrorFragment = Boolean.parseBoolean(implicitErrorFragmentElem.getText()); } if (log.isDebugEnabled()) { log.debug("ImplicitErrorFragment was set to : " + isImplicitErrorFragment); } }
private void parseHashAlgorithm(OMElement oauthConfigElem) { OMElement hashingAlgorithmElement = oauthConfigElem .getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.HASH_ALGORITHM)); if (hashingAlgorithmElement != null) { hashAlgorithm = hashingAlgorithmElement.getText(); } if (log.isDebugEnabled()) { log.debug("Hash algorithm was set to : " + hashAlgorithm); } }
private void parseUseSPTenantDomainConfig(OMElement oauthElem) { OMElement useSPTenantDomainValueElement = oauthElem .getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.OAUTH_USE_SP_TENANT_DOMAIN)); if (useSPTenantDomainValueElement != null) { useSPTenantDomainValue = Boolean.parseBoolean(useSPTenantDomainValueElement.getText().trim()); } if (log.isDebugEnabled()) { log.debug("Use SP tenant domain value is set to: " + useSPTenantDomainValue); } }
private void parseAccessTokenPartitioningDomainsConfig(OMElement oauthConfigElem) { OMElement enableAccessTokenPartitioningElem = oauthConfigElem.getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.ACCESS_TOKEN_PARTITIONING_DOMAINS)); if (enableAccessTokenPartitioningElem != null) { accessTokenPartitioningDomains = enableAccessTokenPartitioningElem.getText(); } if (log.isDebugEnabled()) { log.debug("Enable OAuth Access Token Partitioning Domains was set to : " + accessTokenPartitioningDomains); } }
private void parseTokenPersistenceProcessorConfig(OMElement oauthConfigElem) { OMElement persistenceprocessorConfigElem = oauthConfigElem.getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.TOKEN_PERSISTENCE_PROCESSOR)); if (persistenceprocessorConfigElem != null && StringUtils.isNotBlank(persistenceprocessorConfigElem.getText())) { tokenPersistenceProcessorClassName = persistenceprocessorConfigElem.getText().trim(); } if (log.isDebugEnabled()) { log.debug("Token Persistence Processor was set to : " + tokenPersistenceProcessorClassName); } }
private void parseImplicitErrorFragment(OMElement oauthConfigElem) { OMElement implicitErrorFragmentElem = oauthConfigElem.getFirstChildWithName(getQNameWithIdentityNS(ConfigElements.IMPLICIT_ERROR_FRAGMENT)); if (implicitErrorFragmentElem != null) { isImplicitErrorFragment = Boolean.parseBoolean(implicitErrorFragmentElem.getText()); } if (log.isDebugEnabled()) { log.debug("ImplicitErrorFragment was set to : " + isImplicitErrorFragment); } }
private void readAuthenticationEndpointRetryURL(OMElement documentElement) { OMElement authEndpointRetryURLElem = documentElement.getFirstChildWithName(IdentityApplicationManagementUtil. getQNameWithIdentityApplicationNS(FrameworkConstants.Config.QNAME_AUTHENTICATION_ENDPOINT_RETRY_URL)); if (authEndpointRetryURLElem != null) { authenticationEndpointRetryURL = IdentityUtil.fillURLPlaceholders(authEndpointRetryURLElem.getText()); } }
private void readAuthenticationEndpointPromptURL(OMElement documentElement) { OMElement authEndpointPromptURLElem = documentElement.getFirstChildWithName(IdentityApplicationManagementUtil. getQNameWithIdentityApplicationNS(FrameworkConstants.Config.QNAME_AUTHENTICATION_ENDPOINT_PROMPT_URL)); if (authEndpointPromptURLElem != null) { authenticationEndpointPromptURL = IdentityUtil.fillURLPlaceholders(authEndpointPromptURLElem.getText()); } }
private void readAuthenticationEndpointMissingClaimsURL(OMElement documentElement) { OMElement authEndpointMissingClaimsURLElem = documentElement.getFirstChildWithName (IdentityApplicationManagementUtil.getQNameWithIdentityApplicationNS(FrameworkConstants.Config .QNAME_AUTHENTICATION_ENDPOINT_MISSING_CLAIMS_URL)); if (authEndpointMissingClaimsURLElem != null) { authenticationEndpointMissingClaimsURL = IdentityUtil.fillURLPlaceholders (authEndpointMissingClaimsURLElem.getText()); } }
private void readExtensionPoints(OMElement documentElement) { OMElement extensionsElem = documentElement.getFirstChildWithName(IdentityApplicationManagementUtil. getQNameWithIdentityApplicationNS(FrameworkConstants.Config.QNAME_EXTENSIONS)); if (extensionsElem != null) { for (Iterator extChildElems = extensionsElem.getChildElements(); extChildElems.hasNext(); ) { OMElement extensionElem = (OMElement) extChildElems.next(); instantiateClass(extensionElem); } } }
private void readAuthenticatorNameMappings(OMElement documentElement) { OMElement authenticatorNameMappingsElem = documentElement.getFirstChildWithName(IdentityApplicationManagementUtil. getQNameWithIdentityApplicationNS(FrameworkConstants.Config.QNAME_AUTHENTICATOR_NAME_MAPPINGS)); if (authenticatorNameMappingsElem != null) { for (Iterator authenticatorNameMappingElems = authenticatorNameMappingsElem.getChildrenWithLocalName(FrameworkConstants.Config.ELEM_AUTHENTICATOR_NAME_MAPPING); authenticatorNameMappingElems.hasNext(); ) { processAuthenticatorNameMappingElement((OMElement) authenticatorNameMappingElems.next()); } } }