Class KeyFileApiKeyValidator

java.lang.Object
com.predic8.membrane.core.interceptor.swagger.KeyFileApiKeyValidator
All Implemented Interfaces:
ApiKeyValidator

public class KeyFileApiKeyValidator extends Object implements ApiKeyValidator
  • Constructor Details

    • KeyFileApiKeyValidator

      public KeyFileApiKeyValidator()
  • Method Details

    • getLocation

      public String getLocation()
    • setLocation

      public void setLocation(String location)
      Description
      A file/resource containing one API key description per line. Lines starting with '#' are ignored. An API key description consists of the API key (string without spaces) followed by a space and possibly arbitrary characters (except newlines), for example a description. See here for a description of the format.
    • init

      public void init(Router router) throws Exception
      Specified by:
      init in interface ApiKeyValidator
      Throws:
      Exception
    • isValid

      public boolean isValid(String key)
      Specified by:
      isValid in interface ApiKeyValidator