Interface AuthConfig


public interface AuthConfig
This class represents the runtime authentication related configuration for an individual securityScheme present on an OpenApi spec definition, i.e. the provided files.
  • Field Details

  • Method Details

    • tokenPropagation

      Optional<Boolean> tokenPropagation()
      Enables the authentication token propagation for this particular securityScheme.

      For example, given a file named petstore.json with a securityScheme named "petstore-auth" the following configuration must be used.

      quarkus.openapi-generator.petstore_json.auth.petstore_auth.token-propagation=true

      See Also:
    • headerName

      Optional<String> headerName()
      Configures a particular http header attribute from were to take the security token from when the token propagation is enabled. Use this fine-grained configuration in very particular scenarios.

      For example, given a file named petstore.json with a securityScheme named "petstore-auth" the following configuration must be used.

      quarkus.openapi-generator.petstore_json.auth.petstore_auth.header-name=MyParticularHttpHeaderName

      See Also:
    • username

      Optional<String> username()
      Sets the Basic Authentication username for a given OpenAPI securityScheme.

      For example, given a file named petstore.json with a securityScheme named "petstore-basic-auth", that is of http basic authentication type, the following configuration can establish the user to be used.

      quarkus.openapi-generator.petstore_json.auth.petstore_basic_auth.username=MyUserName

      Returns:
      the username portion for Basic Authentication
      See Also:
    • password

      Optional<String> password()
      Sets the Basic Authentication password for a given OpenAPI securityScheme.

      For example, given a file named petstore.json with a securityScheme named "petstore-basic-auth", that is of http basic authentication type, the following configuration can establish the password to be used.

      quarkus.openapi-generator.petstore_json.auth.petstore_basic_auth.password=MyPassword

      Ignored if the given securityScheme is not Basic Authentication

      Returns:
      the password portion for Basic Authentication
      See Also:
    • bearerToken

      Optional<String> bearerToken()
      Sets the Bearer Token for a given OpenAPI securityScheme.

      For example, given a file named petstore.json with a securityScheme named "petstore-bearer-auth", that is of bearer authentication type, the following configuration can establish the token to be used.

      quarkus.openapi-generator.petstore_json.auth.petstore_bearer_auth.token=1234567890

      Ignored if the given securityScheme is not Bearer Token Authentication

      Returns:
      the token
      See Also:
    • apiKey

      Optional<String> apiKey()
      Sets the API Key for a given OpenAPI securityScheme.

      For example, given a file named petstore.json with a securityScheme named "petstore-apikey-auth", that is of API Key authentication type, the following configuration can establish the API Key to be used.

      quarkus.openapi-generator.petstore_json.auth.petstore_apikey_auth.api-key=${MY_SECRET_KEY_IN_AN_ENV_VAR}

      Ignored if the given securityScheme is not API Key Authentication

      Returns:
      the token
      See Also:
    • useAuthorizationHeaderValue

      Optional<Boolean> useAuthorizationHeaderValue()
      Only valid for API Key Authentication.

      When to add the `Authorization` value to the API Key in the authentication header.

      For example, if this property is set to `true`, the API Key will be sent to the server in the header along with `Authorization`:

      [source] --- Authentication: Authorization MY-API-KEY ---

      If set to `false`, the header should be:

      [source] --- Authentication: MY-API-KEY ---

      Returns:
      whether to use the prefix `Authorization` when sending an API Key using headers.