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

io.mosip.kernel.websub.api.verifier.IntentVerifier Maven / Gradle / Ivy

package io.mosip.kernel.websub.api.verifier;

import org.springframework.beans.factory.annotation.Value;

/**
 * This is a helper class to verify intent after subscribe and unsubscribe
 * operation according to
 * WebSub Specs.
 * 
 * @author Urvil Joshi
 *
 */
public class IntentVerifier {

	@Value("${mosip.kernel.websub-db-version-client-behaviour-enable:false}")
	private boolean isWebsubDbVersionClientBehaviourEnable;

	public boolean isIntentVerified(String topic, String mode, String topicReq, String modeReq) {
		if (!isWebsubDbVersionClientBehaviourEnable) {
			return topic.equals(topicReq);
		} else {
			return (topic.equals(topicReq) && mode.equals(modeReq));
		}
	}

}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy