public final class STRParserUtil extends Object
Modifier and Type | Method and Description |
---|---|
static void |
checkBinarySecurityBSPCompliance(SecurityTokenReference secRef,
BinarySecurity token,
BSPEnforcer bspEnforcer)
Check that the BinarySecurityToken referenced by the SecurityTokenReference argument
is BSP compliant.
|
static void |
checkEncryptedKeyBSPCompliance(SecurityTokenReference secRef,
BSPEnforcer bspEnforcer)
Check that the EncryptedKey referenced by the SecurityTokenReference argument
is BSP compliant.
|
static void |
checkSamlTokenBSPCompliance(SecurityTokenReference secRef,
SamlAssertionWrapper samlAssertion,
BSPEnforcer bspEnforcer)
Check that the SAML token referenced by the SecurityTokenReference argument
is BSP compliant.
|
static void |
checkUsernameTokenBSPCompliance(SecurityTokenReference secRef,
BSPEnforcer bspEnforcer)
Check that the Username token referenced by the SecurityTokenReference argument
is BSP compliant.
|
static Element |
findProcessedTokenElement(Document doc,
WSDocInfo docInfo,
CallbackHandler cb,
String uri,
String type)
Find a token that has been processed already - in other words, it access previous
results to find the element, rather than conducting a general search
|
static Element |
findUnprocessedTokenElement(Document doc,
WSDocInfo docInfo,
CallbackHandler cb,
String uri,
String type)
Find a token that has not been processed already - in other words, it searches for
the element, rather than trying to access previous results to find the element
|
static SamlAssertionWrapper |
getAssertionFromKeyIdentifier(SecurityTokenReference secRef,
Element strElement,
RequestData request)
Get an SamlAssertionWrapper object from parsing a SecurityTokenReference that uses
a KeyIdentifier that points to a SAML Assertion.
|
static byte[] |
getSecretKeyFromToken(String id,
String type,
int identifier,
RequestData data)
Get the Secret Key from a CallbackHandler
|
static Element |
getTokenElement(Document doc,
WSDocInfo docInfo,
CallbackHandler cb,
String uri,
String valueType) |
public static SamlAssertionWrapper getAssertionFromKeyIdentifier(SecurityTokenReference secRef, Element strElement, RequestData request) throws WSSecurityException
secRef
- the SecurityTokenReference to the SAML AssertionstrElement
- The SecurityTokenReference DOM elementrequest
- The RequestData instance used to obtain configurationwsDocInfo
- The WSDocInfo object that holds previous resultsWSSecurityException
public static void checkBinarySecurityBSPCompliance(SecurityTokenReference secRef, BinarySecurity token, BSPEnforcer bspEnforcer) throws WSSecurityException
secRef
- The SecurityTokenReference to the BinarySecurityTokentoken
- The BinarySecurityTokenbspEnforcer
- a BSPEnforcer instance to enforce BSP rulesWSSecurityException
public static void checkEncryptedKeyBSPCompliance(SecurityTokenReference secRef, BSPEnforcer bspEnforcer) throws WSSecurityException
secRef
- The SecurityTokenReference to the BinarySecurityTokenbspEnforcer
- a BSPEnforcer instance to enforce BSP rulesWSSecurityException
public static void checkSamlTokenBSPCompliance(SecurityTokenReference secRef, SamlAssertionWrapper samlAssertion, BSPEnforcer bspEnforcer) throws WSSecurityException
secRef
- The SecurityTokenReference to the SAML tokensamlAssertion
- The SAML Token SamlAssertionWrapper objectbspEnforcer
- a BSPEnforcer instance to enforce BSP rulesWSSecurityException
public static void checkUsernameTokenBSPCompliance(SecurityTokenReference secRef, BSPEnforcer bspEnforcer) throws WSSecurityException
secRef
- The SecurityTokenReference to the Username tokenbspEnforcer
- a BSPEnforcer instance to enforce BSP rulesWSSecurityException
public static byte[] getSecretKeyFromToken(String id, String type, int identifier, RequestData data) throws WSSecurityException
id
- The id of the elementtype
- The type of the element (may be null)identifier
- The WSPasswordCallback usage identifierWSSecurityException
public static Element getTokenElement(Document doc, WSDocInfo docInfo, CallbackHandler cb, String uri, String valueType) throws WSSecurityException
WSSecurityException
public static Element findUnprocessedTokenElement(Document doc, WSDocInfo docInfo, CallbackHandler cb, String uri, String type) throws WSSecurityException
doc
- Parent DocumentdocInfo
- WSDocInfo instancecb
- CallbackHandler instanceuri
- URI of the elementtype
- Type of the elementWSSecurityException
public static Element findProcessedTokenElement(Document doc, WSDocInfo docInfo, CallbackHandler cb, String uri, String type) throws WSSecurityException
doc
- Parent DocumentdocInfo
- WSDocInfo instancecb
- CallbackHandler instanceuri
- URI of the elementtype
- Type of the elementWSSecurityException
Copyright © 2019 JBoss by Red Hat. All rights reserved.