Interface CredentialsProvider

All Known Implementing Classes:
ConfigCredentialsProvider

public interface CredentialsProvider
Provider for security credentials. Clients can implement this interface to control how to provide security credentials in runtime. Annotate your bean with @RequestScope (or @Dependant) and @Priority(1).
  • Method Details

    • getApiKey

      Optional<String> getApiKey(CredentialsContext input)
      Gets the API Key given the OpenAPI definition and security schema
      Parameters:
      input - the input data available to the method
      Returns:
      the API Key to use when filtering the request
    • getBasicUsername

      Optional<String> getBasicUsername(CredentialsContext input)
      Gets the username given the OpenAPI definition and security schema
      Parameters:
      input - the input data available to the method
      Returns:
      the username to use when filtering the request
    • getBasicPassword

      Optional<String> getBasicPassword(CredentialsContext input)
      Gets the password given the OpenAPI definition and security schema
      Parameters:
      input - the input data available to the method
      Returns:
      the password to use when filtering the request
    • getBearerToken

      Optional<String> getBearerToken(CredentialsContext input)
      Gets the Bearer Token given the OpenAPI definition and security schema
      Parameters:
      input - the input data available to the method
      Returns:
      the Bearer Token to use when filtering the request
    • getOauth2BearerToken

      Optional<String> getOauth2BearerToken(CredentialsContext input)
      Gets the OAuth2 Bearer Token given the OpenAPI definition and security schema
      Parameters:
      input - the input data available to the method
      Returns:
      the Bearer Token to use when filtering the request