Class ArtifactBindingUtils

java.lang.Object
org.keycloak.protocol.saml.util.ArtifactBindingUtils

public class ArtifactBindingUtils extends Object
  • Constructor Details

    • ArtifactBindingUtils

      public ArtifactBindingUtils()
  • Method Details

    • artifactToResolverProviderId

      public static String artifactToResolverProviderId(String artifact)
    • byteArrayToResolverProviderId

      public static String byteArrayToResolverProviderId(byte[] ar)
    • computeArtifactBindingIdentifierString

      public static String computeArtifactBindingIdentifierString(String identifierFrom)
      Computes identifier from the given String, for example, from entityId
      Parameters:
      identifierFrom - String that will be turned into an identifier
      Returns:
      Base64 of SHA-1 hash of the identifierFrom
    • getArtifactBindingIdentifierString

      public static String getArtifactBindingIdentifierString(byte[] identifier)
      Turns byte representation of the identifier into readable String
      Parameters:
      identifier - byte representation of the identifier
      Returns:
      Base64 of the identifier
    • computeArtifactBindingIdentifier

      public static byte[] computeArtifactBindingIdentifier(String identifierFrom)
      Computes 20 bytes long byte identifier of the given string, for example, from entityId
      Parameters:
      identifierFrom - String that will be turned into an identifier
      Returns:
      SHA-1 hash of the given identifierFrom