Class WSTrustUtil
- java.lang.Object
-
- com.sun.xml.ws.security.trust.util.WSTrustUtil
-
public class WSTrustUtil extends Object
- Author:
- ws-trust-implementation-team
-
-
Method Summary
-
-
-
Method Detail
-
createSOAP11Fault
public static jakarta.xml.soap.SOAPFault createSOAP11Fault(WSTrustSOAPFaultException sfex)
create and return a SOAP 1.1 Fault corresponding to this exception
-
createSOAP12Fault
public static jakarta.xml.soap.SOAPFault createSOAP12Fault(WSTrustSOAPFaultException sfex)
create and return a SOAP 1.2 Fault corresponding to this exception
-
generateRandomSecret
public static byte[] generateRandomSecret(int keySize)
-
createSecurityContextToken
public static SecurityContextToken createSecurityContextToken(WSTrustElementFactory wsscEleFac) throws WSSecureConversationException
- Throws:
WSSecureConversationException
-
createSecurityContextToken
public static SecurityContextToken createSecurityContextToken(WSSCElementFactory eleFac) throws WSSecureConversationException
- Throws:
WSSecureConversationException
-
createSecurityContextToken
public static SecurityContextToken createSecurityContextToken(WSTrustElementFactory wsscEleFac, String identifier) throws WSSecureConversationException
- Throws:
WSSecureConversationException
-
createSecurityContextToken
public static SecurityContextToken createSecurityContextToken(WSSCElementFactory eleFac, String identifier) throws WSSecureConversationException
- Throws:
WSSecureConversationException
-
createSecurityTokenReference
public static SecurityTokenReference createSecurityTokenReference(String id, String valueType)
-
elemToString
public static String elemToString(BaseSTSResponse rstr, WSTrustVersion wstVer)
-
elemToString
public static String elemToString(BaseSTSRequest rst, WSTrustVersion wstVer)
-
getCurrentTimeWithOffset
public static long getCurrentTimeWithOffset()
-
createLifetime
public static Lifetime createLifetime(long currentTime, long lifespan, WSTrustVersion wstVer)
-
getLifeSpan
public static long getLifeSpan(Lifetime lifetime)
-
parseAttributedDateTime
public static Date parseAttributedDateTime(AttributedDateTime time)
-
encryptKey
public static org.apache.xml.security.encryption.EncryptedKey encryptKey(Document doc, byte[] encryptedKey, X509Certificate cert, String keyWrapAlgorithm) throws Exception
- Throws:
Exception
-
addSamlAttributes
public static Assertion addSamlAttributes(Assertion assertion, Map<QName,List<String>> claimedAttrs) throws WSTrustException
- Throws:
WSTrustException
-
newDocument
public static Document newDocument()
-
-