Class WsTrustUtil

java.lang.Object
swiss.trustbroker.wstrust.util.WsTrustUtil

public class WsTrustUtil extends Object
  • Field Details

    • OP_LOG

      public static final org.slf4j.Logger OP_LOG
  • Method Details

    • createLifeTime

      public static org.opensaml.soap.wstrust.Lifetime createLifeTime(Instant createdTime, Instant expiresTime)
    • createTimestamp

      public static org.opensaml.soap.wssecurity.Timestamp createTimestamp(Instant createdTime, Instant expiresTime)
    • createExpires

      public static org.opensaml.soap.wssecurity.Expires createExpires(Instant expiresDate)
    • createCreated

      public static org.opensaml.soap.wssecurity.Created createCreated(Instant createdTime)
    • createResponseAppliesTo

      public static org.opensaml.soap.wspolicy.AppliesTo createResponseAppliesTo(String subjectCondition)
    • createResponseEndpointReference

      public static org.opensaml.soap.wsfed.EndPointReference createResponseEndpointReference(String subjectCondition)
    • createEndpointRefAddress

      public static org.opensaml.soap.wsfed.Address createEndpointRefAddress(String subjectCondition)
    • createKeyType

      public static org.opensaml.soap.wstrust.KeyType createKeyType(String keyTypeValue)
    • createTokenType

      public static org.opensaml.soap.wstrust.TokenType createTokenType()
    • createRequestType

      public static org.opensaml.soap.wstrust.RequestType createRequestType(String typeValue)
    • createRequestUnattachedRef

      public static org.opensaml.soap.wstrust.RequestedUnattachedReference createRequestUnattachedRef(String assertionId)
    • createRequestedAttachedRef

      public static org.opensaml.soap.wstrust.RequestedAttachedReference createRequestedAttachedRef(String assertionId)
    • createSecurityTokenReference

      public static org.opensaml.soap.wssecurity.SecurityTokenReference createSecurityTokenReference(String assertionId)
    • createKeyIdentifier

      public static org.opensaml.soap.wssecurity.KeyIdentifier createKeyIdentifier(String assertionId)
    • createTokenTypeAttribute

      public static QName createTokenTypeAttribute()
    • createTokenTypeAttributeValue

      public static QName createTokenTypeAttributeValue()
    • createRequestedSecurityToken

      public static org.opensaml.soap.wstrust.RequestedSecurityToken createRequestedSecurityToken(org.opensaml.saml.saml2.core.Assertion assertion)
    • createSecurityTokenResponse

      public static org.opensaml.soap.wstrust.RequestSecurityTokenResponse createSecurityTokenResponse(org.opensaml.soap.wstrust.RequestedSecurityToken requestedSecurityToken)
    • getKeyTypeFromRequest

      public static String getKeyTypeFromRequest(org.opensaml.soap.wstrust.RequestSecurityToken requestSecurityToken)
    • getAddressFromRequest

      public static String getAddressFromRequest(org.opensaml.soap.wstrust.RequestSecurityToken requestSecurityToken)
    • getElementValueByTagName

      public static String getElementValueByTagName(String tagName, String tagNameWithNamespace, Element element)
    • validatePeriod

      public static boolean validatePeriod(String periodType, org.opensaml.soap.wssecurity.Created created, org.opensaml.soap.wssecurity.Expires expires, Instant now, long notBeforeToleranceSec, long notOnOrAfterToleranceSec)
    • getNode

      public static Node getNode(org.springframework.ws.soap.SoapElement soapMessage)
    • isNetworkAllowed

      public static boolean isNetworkAllowed(List<String> allowedNetworks, boolean enforceClientNetwork, jakarta.servlet.http.HttpServletRequest request, swiss.trustbroker.config.dto.NetworkConfig network)
    • isClientIpAllowed

      public static boolean isClientIpAllowed(String clientIpRegex, boolean enforceClientIp, String clientIp)
    • getNameID

      public static org.opensaml.saml.saml2.core.NameID getNameID(org.opensaml.saml.saml2.core.Assertion assertion)
    • getAuthnContextClasses

      public static List<String> getAuthnContextClasses(org.opensaml.saml.saml2.core.Assertion requestHeaderAssertion)
    • getIssuerId

      public static String getIssuerId(org.opensaml.saml.saml2.core.Assertion assertion)