Class X509SecurityTokenImpl

    • Field Summary

      • Fields inherited from class org.apache.xml.security.stax.impl.securityToken.AbstractSecurityToken

        keyTable, tokenUsages
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected X509SecurityTokenImpl​(org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenType tokenType, WSInboundSecurityContext wsInboundSecurityContext, Crypto crypto, CallbackHandler callbackHandler, String id, org.apache.xml.security.stax.securityToken.SecurityTokenConstants.KeyIdentifier keyIdentifier, WSSSecurityProperties securityProperties, boolean includedInMessage)  
    • Method Summary

      All Methods Instance Methods Abstract Methods Concrete Methods 
      Modifier and Type Method Description
      protected abstract String getAlias()  
      CallbackHandler getCallbackHandler()  
      protected Crypto getCrypto()  
      Key getKey​(String algorithmURI, org.apache.xml.security.stax.ext.XMLSecurityConstants.AlgorithmUsage algorithmUsage, String correlationID)  
      Principal getPrincipal()  
      Subject getSubject()  
      org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenType getTokenType()  
      X509Certificate[] getX509Certificates()  
      protected boolean matches​(X509Certificate cert, Collection<Pattern> subjectDNPatterns)  
      protected void setCrypto​(Crypto crypto)  
      void verify()  
      • Methods inherited from class org.apache.xml.security.stax.impl.securityToken.X509SecurityToken

        isAsymmetric
      • Methods inherited from class org.apache.xml.security.stax.impl.securityToken.AbstractInboundSecurityToken

        addTokenUsage, addWrappedToken, getElementPath, getKeyIdentifier, getKeyWrappingToken, getPubKey, getPublicKey, getSecretKey, getWrappedTokens, getXMLSecEvent, isIncludedInMessage, setElementPath, setKeyWrappingToken, setXMLSecEvent
      • Methods inherited from class org.apache.xml.security.stax.impl.securityToken.AbstractSecurityToken

        getId, getPublicKey, getSecretKey, getSha1Identifier, getTokenUsages, setAsymmetric, setPublicKey, setSecretKey, setSha1Identifier, setX509Certificates
      • Methods inherited from interface org.apache.xml.security.stax.securityToken.SecurityToken

        addTokenUsage, getId, getKeyIdentifier, getKeyWrappingToken, getPublicKey, getSecretKey, getSha1Identifier, getTokenUsages, getWrappedTokens, isAsymmetric
    • Constructor Detail

      • X509SecurityTokenImpl

        protected X509SecurityTokenImpl​(org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenType tokenType,
                                        WSInboundSecurityContext wsInboundSecurityContext,
                                        Crypto crypto,
                                        CallbackHandler callbackHandler,
                                        String id,
                                        org.apache.xml.security.stax.securityToken.SecurityTokenConstants.KeyIdentifier keyIdentifier,
                                        WSSSecurityProperties securityProperties,
                                        boolean includedInMessage)
    • Method Detail

      • getCrypto

        protected Crypto getCrypto()
      • setCrypto

        protected void setCrypto​(Crypto crypto)
      • getKey

        public Key getKey​(String algorithmURI,
                          org.apache.xml.security.stax.ext.XMLSecurityConstants.AlgorithmUsage algorithmUsage,
                          String correlationID)
                   throws org.apache.xml.security.exceptions.XMLSecurityException
        Overrides:
        getKey in class org.apache.xml.security.stax.impl.securityToken.AbstractInboundSecurityToken
        Throws:
        org.apache.xml.security.exceptions.XMLSecurityException
      • getX509Certificates

        public X509Certificate[] getX509Certificates()
                                              throws org.apache.xml.security.exceptions.XMLSecurityException
        Specified by:
        getX509Certificates in interface org.apache.xml.security.stax.securityToken.SecurityToken
        Overrides:
        getX509Certificates in class org.apache.xml.security.stax.impl.securityToken.AbstractSecurityToken
        Throws:
        org.apache.xml.security.exceptions.XMLSecurityException
      • verify

        public void verify()
                    throws org.apache.xml.security.exceptions.XMLSecurityException
        Specified by:
        verify in interface org.apache.xml.security.stax.securityToken.InboundSecurityToken
        Overrides:
        verify in class org.apache.xml.security.stax.impl.securityToken.AbstractInboundSecurityToken
        Throws:
        org.apache.xml.security.exceptions.XMLSecurityException
      • matches

        protected boolean matches​(X509Certificate cert,
                                  Collection<Pattern> subjectDNPatterns)
        Returns:
        true if the certificate's SubjectDN matches the constraints defined in the subject DNConstraints; false, otherwise. The certificate subject DN only has to match ONE of the subject cert constraints (not all).
      • getAlias

        protected abstract String getAlias()
                                    throws org.apache.xml.security.exceptions.XMLSecurityException
        Throws:
        org.apache.xml.security.exceptions.XMLSecurityException
      • getTokenType

        public org.apache.xml.security.stax.securityToken.SecurityTokenConstants.TokenType getTokenType()
        Specified by:
        getTokenType in interface org.apache.xml.security.stax.securityToken.SecurityToken
        Overrides:
        getTokenType in class org.apache.xml.security.stax.impl.securityToken.X509SecurityToken