All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.sap.cloud.security.token.validation.LocalhostIssuerValidator Maven / Gradle / Ivy

There is a newer version: 3.5.4
Show newest version
package com.sap.cloud.security.token.validation;

/**
 * LocalhostIssuerValidator brings backward-compatibility for test credentials in consumer applications written before
 * 2.17.0 that are used to validate java-security-test tokens. This is necessary for successful validation of localhost
 * issuers that include a port when 'localhost' is defined as trusted domain without port in the service credentials.
 * This class MUST NOT be loaded outside test scope and MUST be the ONLY implementation of {@link TestIssuerValidator}.
 */
public class LocalhostIssuerValidator implements TestIssuerValidator {

	@Override
	public boolean isValidIssuer(String issuer) {
		return issuer.startsWith("http://localhost") || issuer.startsWith("https://localhost");
	}
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy