Class ConstantContextDataProvider

java.lang.Object
com.styra.opa.springboot.ConstantContextDataProvider
All Implemented Interfaces:
ContextDataProvider

public class ConstantContextDataProvider extends Object implements ContextDataProvider
This helper class implements ContextDataProvider and always returns the same constant value passed in the constructor. This is useful for tests, and also for situations where the extra data to inject does not change during runtime.