Examples of SignatureType


Examples of org.apache.camel.component.xmlsecurity.api.SignatureType

            if (keySelector == null) {
                throw new XmlSignatureNoKeyException(
                        "Key selector is missing for XML signature generation. Specify a key selector in the configuration.");
            }

            SignatureType signatureType = determineSignatureType(out);

            final List<String> contentReferenceUris = getContentReferenceUris(out, signatureType, node);

            Node lastParent = null;
            // per content reference URI a signature is built; for enveloped and enveloping there is only one content reference URI;
View Full Code Here

Examples of org.apache.camel.component.xmlsecurity.api.SignatureType

                    "The configuration of the XML signer component is wrong. The parent local name "
                            + getConfiguration().getParentLocalName()
                            + " for an enveloped signature and the XPATHs to ID attributes for a detached signature are specified. You must not specify both parameters.");
        }

        SignatureType result;
        if (isEnveloped) {
            result = SignatureType.enveloped;
        } else if (isDetached) {
            if (getSchemaResourceUri(message) == null) {
                throw new XmlSignatureException(
View Full Code Here

Examples of org.apache.shindig.auth.OAuthUtil.SignatureType

    String bodyHash = info.message.getParameter("oauth_body_hash");
    if (tokenEndpoint && bodyHash != null) {
      throw new RuntimeException("Can't have body hash on token endpoints");
    }
    SignatureType sigType = OAuthUtil.getSignatureType(tokenEndpoint,
        info.request.getHeader("Content-Type"));
    switch (sigType) {
      case URL_ONLY:
        break;
      case URL_AND_FORM_PARAMS:
View Full Code Here

Examples of org.apache.shindig.auth.OAuthUtil.SignatureType

    info.message.validateMessage(accessor, new FakeTimeOAuthValidator());
    String bodyHash = info.message.getParameter("oauth_body_hash");
    if (tokenEndpoint && bodyHash != null) {
      throw new RuntimeException("Can't have body hash on token endpoints");
    }
    SignatureType sigType = OAuthUtil.getSignatureType(tokenEndpoint,
        info.request.getHeader("Content-Type"));
    switch (sigType) {
      case URL_ONLY:
        break;
      case URL_AND_FORM_PARAMS:
View Full Code Here

Examples of org.apache.shindig.auth.OAuthUtil.SignatureType

    info.message.validateMessage(accessor, new FakeTimeOAuthValidator());
    String bodyHash = info.message.getParameter("oauth_body_hash");
    if (tokenEndpoint && bodyHash != null) {
      throw new RuntimeException("Can't have body hash on token endpoints");
    }
    SignatureType sigType = OAuthUtil.getSignatureType(tokenEndpoint,
        info.request.getHeader("Content-Type"));
    switch (sigType) {
      case URL_ONLY:
        break;
      case URL_AND_FORM_PARAMS:
View Full Code Here

Examples of org.apache.shindig.auth.OAuthUtil.SignatureType

   
    String bodyHash = info.message.getParameter("oauth_body_hash");
    if (tokenEndpoint && bodyHash != null) {
      throw new RuntimeException("Can't have body hash on token endpoints");
    }
    SignatureType sigType = OAuthUtil.getSignatureType(tokenEndpoint,
        info.request.getHeader("Content-Type"));
    switch (sigType) {
      case URL_ONLY:
        break;
      case URL_AND_FORM_PARAMS:
View Full Code Here

Examples of org.apache.shindig.auth.OAuthUtil.SignatureType

    String bodyHash = info.message.getParameter("oauth_body_hash");
    if (tokenEndpoint && bodyHash != null) {
      throw new RuntimeException("Can't have body hash on token endpoints");
    }
    SignatureType sigType = OAuthUtil.getSignatureType(tokenEndpoint,
        info.request.getHeader("Content-Type"));
    switch (sigType) {
      case URL_ONLY:
        break;
      case URL_AND_FORM_PARAMS:
View Full Code Here

Examples of org.apache.shindig.auth.OAuthUtil.SignatureType

    String bodyHash = info.message.getParameter("oauth_body_hash");
    if (tokenEndpoint && bodyHash != null) {
      throw new RuntimeException("Can't have body hash on token endpoints");
    }
    SignatureType sigType = OAuthUtil.getSignatureType(tokenEndpoint,
        info.request.getHeader("Content-Type"));
    switch (sigType) {
      case URL_ONLY:
        break;
      case URL_AND_FORM_PARAMS:
View Full Code Here

Examples of org.apache.shindig.auth.OAuthUtil.SignatureType

    String bodyHash = info.message.getParameter("oauth_body_hash");
    if (tokenEndpoint && bodyHash != null) {
      throw new RuntimeException("Can't have body hash on token endpoints");
    }
    SignatureType sigType = OAuthUtil.getSignatureType(tokenEndpoint,
        info.request.getHeader("Content-Type"));
    switch (sigType) {
      case URL_ONLY:
        break;
      case URL_AND_FORM_PARAMS:
View Full Code Here

Examples of org.apache.xml.security.binding.xmldsig.SignatureType

    @Override
    public void handle(final InputProcessorChain inputProcessorChain, final XMLSecurityProperties securityProperties,
                       Deque<XMLSecEvent> eventQueue, Integer index) throws XMLSecurityException {

        @SuppressWarnings("unchecked")
        final SignatureType signatureType = ((JAXBElement<SignatureType>) parseStructure(eventQueue, index, securityProperties)).getValue();
        if (signatureType.getSignedInfo() == null) {
            throw new XMLSecurityException("stax.signature.signedInfoMissing");
        }
        if (signatureType.getSignedInfo().getSignatureMethod() == null) {
            throw new XMLSecurityException("stax.signature.signatureMethodMissing");
        }
        if (signatureType.getSignedInfo().getCanonicalizationMethod() == null) {
            throw new XMLSecurityException("stax.signature.canonicalizationMethodMissing");
        }
        if (signatureType.getSignatureValue() == null) {
            throw new XMLSecurityException("stax.signature.signatureValueMissing");
        }
        if (signatureType.getId() == null) {
            signatureType.setId(IDGenerator.generateID(null));
        }
        InboundSecurityToken inboundSecurityToken = verifySignedInfo(inputProcessorChain, securityProperties, signatureType, eventQueue, index);
        addSignatureReferenceInputProcessorToChain(inputProcessorChain, securityProperties, signatureType, inboundSecurityToken);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.