private static void validateSignatureAlgorithm(String signatureAlgorithm, Credential credential) {
        final String jcaAlgorithmID = AlgorithmSupport.getAlgorithmID(signatureAlgorithm);
        if (jcaAlgorithmID == null) {
            throw new IllegalStateException("unsupported signature algorithm: " + signatureAlgorithm);
        }
        try {
            final Signature signature = Signature.getInstance(jcaAlgorithmID);
            final PrivateKey key = credential.getPrivateKey();
            if (key != null) {
                signature.initSign(key);
            } else {
                signature.initVerify(credential.getPublicKey());
            }
        } catch (NoSuchAlgorithmException e) {
            throw new IllegalStateException("unsupported signature algorithm: " + signatureAlgorithm, e);
        } catch (InvalidKeyException e) {
            throw new IllegalStateException("failed to initialize a signature with an algorithm: " +
                                            signatureAlgorithm, e);
        }
    }
Builds a {@link SamlServiceProvider} which helps a {@link Server} have a SAML-based
authentication.
saml/src/main/java/com/linecorp/armeria/server/saml/SamlServiceProviderBuilder.java