Java Code Examples for org.apache.ws.security.WSConstants#BST
The following examples show how to use
org.apache.ws.security.WSConstants#BST .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: KerberosTokenInterceptorProvider.java From steady with Apache License 2.0 | 6 votes |
private List<WSSecurityEngineResult> findKerberosResults( List<WSSecurityEngineResult> wsSecEngineResults ) { List<WSSecurityEngineResult> results = new ArrayList<WSSecurityEngineResult>(); for (WSSecurityEngineResult wser : wsSecEngineResults) { Integer actInt = (Integer)wser.get(WSSecurityEngineResult.TAG_ACTION); if (actInt.intValue() == WSConstants.BST) { BinarySecurity binarySecurity = (BinarySecurity)wser.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN); if (binarySecurity instanceof KerberosSecurity) { results.add(wser); } } } return results; }
Example 2
Source File: KerberosTokenInterceptorProvider.java From steady with Apache License 2.0 | 6 votes |
private List<WSSecurityEngineResult> findKerberosResults( List<WSSecurityEngineResult> wsSecEngineResults ) { List<WSSecurityEngineResult> results = new ArrayList<WSSecurityEngineResult>(); for (WSSecurityEngineResult wser : wsSecEngineResults) { Integer actInt = (Integer)wser.get(WSSecurityEngineResult.TAG_ACTION); if (actInt.intValue() == WSConstants.BST) { BinarySecurity binarySecurity = (BinarySecurity)wser.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN); if (binarySecurity instanceof KerberosSecurity) { results.add(wser); } } } return results; }
Example 3
Source File: KerberosTokenInterceptorProvider.java From steady with Apache License 2.0 | 6 votes |
private List<WSSecurityEngineResult> findKerberosResults( List<WSSecurityEngineResult> wsSecEngineResults ) { List<WSSecurityEngineResult> results = new ArrayList<WSSecurityEngineResult>(); for (WSSecurityEngineResult wser : wsSecEngineResults) { Integer actInt = (Integer)wser.get(WSSecurityEngineResult.TAG_ACTION); if (actInt.intValue() == WSConstants.BST) { BinarySecurity binarySecurity = (BinarySecurity)wser.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN); if (binarySecurity instanceof KerberosSecurity) { results.add(wser); } } } return results; }
Example 4
Source File: KerberosTokenInterceptorProvider.java From steady with Apache License 2.0 | 6 votes |
private List<WSSecurityEngineResult> findKerberosResults( List<WSSecurityEngineResult> wsSecEngineResults ) { List<WSSecurityEngineResult> results = new ArrayList<WSSecurityEngineResult>(); for (WSSecurityEngineResult wser : wsSecEngineResults) { Integer actInt = (Integer)wser.get(WSSecurityEngineResult.TAG_ACTION); if (actInt.intValue() == WSConstants.BST) { BinarySecurity binarySecurity = (BinarySecurity)wser.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN); if (binarySecurity instanceof KerberosSecurity) { results.add(wser); } } } return results; }
Example 5
Source File: IssuedTokenInterceptorProvider.java From steady with Apache License 2.0 | 5 votes |
private List<BinarySecurity> findBinarySecurityTokenResults( List<WSSecurityEngineResult> wsSecEngineResults ) { List<BinarySecurity> results = new ArrayList<BinarySecurity>(); for (WSSecurityEngineResult wser : wsSecEngineResults) { Integer actInt = (Integer)wser.get(WSSecurityEngineResult.TAG_ACTION); if (actInt.intValue() == WSConstants.BST) { results.add((BinarySecurity)wser.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN)); } } return results; }
Example 6
Source File: IssuedTokenInterceptorProvider.java From steady with Apache License 2.0 | 5 votes |
private List<BinarySecurity> findBinarySecurityTokenResults( List<WSSecurityEngineResult> wsSecEngineResults ) { List<BinarySecurity> results = new ArrayList<BinarySecurity>(); for (WSSecurityEngineResult wser : wsSecEngineResults) { Integer actInt = (Integer)wser.get(WSSecurityEngineResult.TAG_ACTION); if (actInt.intValue() == WSConstants.BST) { results.add((BinarySecurity)wser.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN)); } } return results; }
Example 7
Source File: IssuedTokenInterceptorProvider.java From steady with Apache License 2.0 | 5 votes |
private List<BinarySecurity> findBinarySecurityTokenResults( List<WSSecurityEngineResult> wsSecEngineResults ) { List<BinarySecurity> results = new ArrayList<BinarySecurity>(); for (WSSecurityEngineResult wser : wsSecEngineResults) { Integer actInt = (Integer)wser.get(WSSecurityEngineResult.TAG_ACTION); if (actInt.intValue() == WSConstants.BST) { results.add((BinarySecurity)wser.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN)); } } return results; }
Example 8
Source File: IssuedTokenInterceptorProvider.java From steady with Apache License 2.0 | 5 votes |
private List<BinarySecurity> findBinarySecurityTokenResults( List<WSSecurityEngineResult> wsSecEngineResults ) { List<BinarySecurity> results = new ArrayList<BinarySecurity>(); for (WSSecurityEngineResult wser : wsSecEngineResults) { Integer actInt = (Integer)wser.get(WSSecurityEngineResult.TAG_ACTION); if (actInt.intValue() == WSConstants.BST) { results.add((BinarySecurity)wser.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN)); } } return results; }
Example 9
Source File: AbstractSupportingTokenPolicyValidator.java From steady with Apache License 2.0 | 4 votes |
/** * Process Kerberos Tokens. */ protected boolean processKerberosTokens() { List<WSSecurityEngineResult> tokenResults = new ArrayList<WSSecurityEngineResult>(); List<WSSecurityEngineResult> dktResults = new ArrayList<WSSecurityEngineResult>(); for (WSSecurityEngineResult wser : results) { Integer actInt = (Integer)wser.get(WSSecurityEngineResult.TAG_ACTION); if (actInt.intValue() == WSConstants.BST) { BinarySecurity binarySecurity = (BinarySecurity)wser.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN); if (binarySecurity instanceof KerberosSecurity) { if (derived) { byte[] secret = (byte[])wser.get(WSSecurityEngineResult.TAG_SECRET); WSSecurityEngineResult dktResult = getMatchingDerivedKey(secret); if (dktResult != null) { dktResults.add(dktResult); } } tokenResults.add(wser); } } } if (tokenResults.isEmpty()) { return false; } if (signed && !areTokensSigned(tokenResults)) { return false; } if (encrypted && !areTokensEncrypted(tokenResults)) { return false; } tokenResults.addAll(dktResults); if (endorsed && !checkEndorsed(tokenResults)) { return false; } if (!validateSignedEncryptedPolicies(tokenResults)) { return false; } return true; }
Example 10
Source File: AbstractSupportingTokenPolicyValidator.java From steady with Apache License 2.0 | 4 votes |
/** * Process X509 Tokens. */ protected boolean processX509Tokens() { List<WSSecurityEngineResult> tokenResults = new ArrayList<WSSecurityEngineResult>(); List<WSSecurityEngineResult> dktResults = new ArrayList<WSSecurityEngineResult>(); for (WSSecurityEngineResult wser : results) { Integer actInt = (Integer)wser.get(WSSecurityEngineResult.TAG_ACTION); if (actInt.intValue() == WSConstants.BST) { BinarySecurity binarySecurity = (BinarySecurity)wser.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN); if (binarySecurity instanceof X509Security || binarySecurity instanceof PKIPathSecurity) { if (derived) { WSSecurityEngineResult resultToStore = processX509DerivedTokenResult(wser); if (resultToStore != null) { dktResults.add(resultToStore); } } tokenResults.add(wser); } } } if (tokenResults.isEmpty()) { return false; } if (signed && !areTokensSigned(tokenResults)) { return false; } if (encrypted && !areTokensEncrypted(tokenResults)) { return false; } tokenResults.addAll(dktResults); if (endorsed && !checkEndorsed(tokenResults)) { return false; } if (!validateSignedEncryptedPolicies(tokenResults)) { return false; } return true; }
Example 11
Source File: AbstractSupportingTokenPolicyValidator.java From steady with Apache License 2.0 | 4 votes |
/** * Process Kerberos Tokens. */ protected boolean processKerberosTokens() { List<WSSecurityEngineResult> tokenResults = new ArrayList<WSSecurityEngineResult>(); List<WSSecurityEngineResult> dktResults = new ArrayList<WSSecurityEngineResult>(); for (WSSecurityEngineResult wser : results) { Integer actInt = (Integer)wser.get(WSSecurityEngineResult.TAG_ACTION); if (actInt.intValue() == WSConstants.BST) { BinarySecurity binarySecurity = (BinarySecurity)wser.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN); if (binarySecurity instanceof KerberosSecurity) { if (derived) { byte[] secret = (byte[])wser.get(WSSecurityEngineResult.TAG_SECRET); WSSecurityEngineResult dktResult = getMatchingDerivedKey(secret); if (dktResult != null) { dktResults.add(dktResult); } } tokenResults.add(wser); } } } if (tokenResults.isEmpty()) { return false; } if (signed && !areTokensSigned(tokenResults)) { return false; } if (encrypted && !areTokensEncrypted(tokenResults)) { return false; } tokenResults.addAll(dktResults); if (endorsed && !checkEndorsed(tokenResults)) { return false; } if (!validateSignedEncryptedPolicies(tokenResults)) { return false; } return true; }
Example 12
Source File: AbstractSupportingTokenPolicyValidator.java From steady with Apache License 2.0 | 4 votes |
/** * Process X509 Tokens. */ protected boolean processX509Tokens() { List<WSSecurityEngineResult> tokenResults = new ArrayList<WSSecurityEngineResult>(); List<WSSecurityEngineResult> dktResults = new ArrayList<WSSecurityEngineResult>(); for (WSSecurityEngineResult wser : results) { Integer actInt = (Integer)wser.get(WSSecurityEngineResult.TAG_ACTION); if (actInt.intValue() == WSConstants.BST) { BinarySecurity binarySecurity = (BinarySecurity)wser.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN); if (binarySecurity instanceof X509Security || binarySecurity instanceof PKIPathSecurity) { if (derived) { WSSecurityEngineResult resultToStore = processX509DerivedTokenResult(wser); if (resultToStore != null) { dktResults.add(resultToStore); } } tokenResults.add(wser); } } } if (tokenResults.isEmpty()) { return false; } if (signed && !areTokensSigned(tokenResults)) { return false; } if (encrypted && !areTokensEncrypted(tokenResults)) { return false; } tokenResults.addAll(dktResults); if (endorsed && !checkEndorsed(tokenResults)) { return false; } if (!validateSignedEncryptedPolicies(tokenResults)) { return false; } return true; }
Example 13
Source File: AbstractSupportingTokenPolicyValidator.java From steady with Apache License 2.0 | 4 votes |
/** * Process Kerberos Tokens. */ protected boolean processKerberosTokens() { List<WSSecurityEngineResult> tokenResults = new ArrayList<WSSecurityEngineResult>(); List<WSSecurityEngineResult> dktResults = new ArrayList<WSSecurityEngineResult>(); for (WSSecurityEngineResult wser : results) { Integer actInt = (Integer)wser.get(WSSecurityEngineResult.TAG_ACTION); if (actInt.intValue() == WSConstants.BST) { BinarySecurity binarySecurity = (BinarySecurity)wser.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN); if (binarySecurity instanceof KerberosSecurity) { if (derived) { byte[] secret = (byte[])wser.get(WSSecurityEngineResult.TAG_SECRET); WSSecurityEngineResult dktResult = getMatchingDerivedKey(secret); if (dktResult != null) { dktResults.add(dktResult); } } tokenResults.add(wser); } } } if (tokenResults.isEmpty()) { return false; } if (signed && !areTokensSigned(tokenResults)) { return false; } if (encrypted && !areTokensEncrypted(tokenResults)) { return false; } tokenResults.addAll(dktResults); if (endorsed && !checkEndorsed(tokenResults)) { return false; } if (!validateSignedEncryptedPolicies(tokenResults)) { return false; } return true; }
Example 14
Source File: AbstractSupportingTokenPolicyValidator.java From steady with Apache License 2.0 | 4 votes |
/** * Process X509 Tokens. */ protected boolean processX509Tokens() { List<WSSecurityEngineResult> tokenResults = new ArrayList<WSSecurityEngineResult>(); List<WSSecurityEngineResult> dktResults = new ArrayList<WSSecurityEngineResult>(); for (WSSecurityEngineResult wser : results) { Integer actInt = (Integer)wser.get(WSSecurityEngineResult.TAG_ACTION); if (actInt.intValue() == WSConstants.BST) { BinarySecurity binarySecurity = (BinarySecurity)wser.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN); if (binarySecurity instanceof X509Security || binarySecurity instanceof PKIPathSecurity) { if (derived) { WSSecurityEngineResult resultToStore = processX509DerivedTokenResult(wser); if (resultToStore != null) { dktResults.add(resultToStore); } } tokenResults.add(wser); } } } if (tokenResults.isEmpty()) { return false; } if (signed && !areTokensSigned(tokenResults)) { return false; } if (encrypted && !areTokensEncrypted(tokenResults)) { return false; } tokenResults.addAll(dktResults); if (endorsed && !checkEndorsed(tokenResults)) { return false; } if (!validateSignedEncryptedPolicies(tokenResults)) { return false; } return true; }
Example 15
Source File: AbstractSupportingTokenPolicyValidator.java From steady with Apache License 2.0 | 4 votes |
/** * Process Kerberos Tokens. */ protected boolean processKerberosTokens() { List<WSSecurityEngineResult> tokenResults = new ArrayList<WSSecurityEngineResult>(); List<WSSecurityEngineResult> dktResults = new ArrayList<WSSecurityEngineResult>(); for (WSSecurityEngineResult wser : results) { Integer actInt = (Integer)wser.get(WSSecurityEngineResult.TAG_ACTION); if (actInt.intValue() == WSConstants.BST) { BinarySecurity binarySecurity = (BinarySecurity)wser.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN); if (binarySecurity instanceof KerberosSecurity) { if (derived) { byte[] secret = (byte[])wser.get(WSSecurityEngineResult.TAG_SECRET); WSSecurityEngineResult dktResult = getMatchingDerivedKey(secret); if (dktResult != null) { dktResults.add(dktResult); } } tokenResults.add(wser); } } } if (tokenResults.isEmpty()) { return false; } if (signed && !areTokensSigned(tokenResults)) { return false; } if (encrypted && !areTokensEncrypted(tokenResults)) { return false; } tokenResults.addAll(dktResults); if (endorsed && !checkEndorsed(tokenResults)) { return false; } if (!validateSignedEncryptedPolicies(tokenResults)) { return false; } return true; }
Example 16
Source File: AbstractSupportingTokenPolicyValidator.java From steady with Apache License 2.0 | 4 votes |
/** * Process X509 Tokens. */ protected boolean processX509Tokens() { List<WSSecurityEngineResult> tokenResults = new ArrayList<WSSecurityEngineResult>(); List<WSSecurityEngineResult> dktResults = new ArrayList<WSSecurityEngineResult>(); for (WSSecurityEngineResult wser : results) { Integer actInt = (Integer)wser.get(WSSecurityEngineResult.TAG_ACTION); if (actInt.intValue() == WSConstants.BST) { BinarySecurity binarySecurity = (BinarySecurity)wser.get(WSSecurityEngineResult.TAG_BINARY_SECURITY_TOKEN); if (binarySecurity instanceof X509Security || binarySecurity instanceof PKIPathSecurity) { if (derived) { WSSecurityEngineResult resultToStore = processX509DerivedTokenResult(wser); if (resultToStore != null) { dktResults.add(resultToStore); } } tokenResults.add(wser); } } } if (tokenResults.isEmpty()) { return false; } if (signed && !areTokensSigned(tokenResults)) { return false; } if (encrypted && !areTokensEncrypted(tokenResults)) { return false; } tokenResults.addAll(dktResults); if (endorsed && !checkEndorsed(tokenResults)) { return false; } if (!validateSignedEncryptedPolicies(tokenResults)) { return false; } return true; }