Package com.sun.identity.wss.security
Class SAML2TokenUtils
- java.lang.Object
-
- com.sun.identity.wss.security.SAML2TokenUtils
-
public class SAML2TokenUtils extends Object
This class provides utility classes for the SAML2 token support
-
-
Constructor Summary
Constructors Constructor Description SAML2TokenUtils()Creates a new instance of SAML2TokenUtils
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static X509CertificategetCertificate(SecurityToken securityToken)Returns anX509Certificatefrom the security token if it is of type SAML2 token holder of key.static ElementgetKeyInfo(Assertion assertion)Returns theKeyInfoelement from the assertion.static KeygetSecretKey(SecurityToken securityToken, String certAlias)static booleanvalidateAssertion(Assertion assertion, Subject subject, Map secureAttrs)Validates Assertion and sets the principal into the container Subject.
-
-
-
Method Detail
-
getCertificate
public static X509Certificate getCertificate(SecurityToken securityToken) throws SecurityException
Returns anX509Certificatefrom the security token if it is of type SAML2 token holder of key.- Throws:
SecurityException
-
getSecretKey
public static Key getSecretKey(SecurityToken securityToken, String certAlias) throws SecurityException
- Throws:
SecurityException
-
getKeyInfo
public static Element getKeyInfo(Assertion assertion)
Returns theKeyInfoelement from the assertion.
-
validateAssertion
public static boolean validateAssertion(Assertion assertion, Subject subject, Map secureAttrs) throws SecurityException
Validates Assertion and sets the principal into the container Subject.- Throws:
SecurityException
-
-