Class SecuritySchemeObjectBuilder


  • public class SecuritySchemeObjectBuilder
    extends java.lang.Object

    Defines a security scheme that can be used by the operations. Supported schemes are HTTP authentication, an API key (either as a header or as a query parameter), OAuth2's common flows (implicit, password, application and access code) as defined in RFC6749, and OpenID Connect Discovery.

    • Constructor Detail

      • SecuritySchemeObjectBuilder

        public SecuritySchemeObjectBuilder()
    • Method Detail

      • withType

        public SecuritySchemeObjectBuilder withType​(java.lang.String type)
        Parameters:
        type - REQUIRED. The type of the security scheme. Valid values are "apiKey", "http", "oauth2", "openIdConnect".
        Returns:
        The current builder
      • withDescription

        public SecuritySchemeObjectBuilder withDescription​(java.lang.String description)
        Parameters:
        description - A short description for security scheme. CommonMark syntax MAY be used for rich text representation.
        Returns:
        The current builder
      • withName

        public SecuritySchemeObjectBuilder withName​(java.lang.String name)
        Parameters:
        name - REQUIRED (when type is apiKey). The name of the header, query or cookie parameter to be used.
        Returns:
        The current builder
      • withIn

        public SecuritySchemeObjectBuilder withIn​(java.lang.String in)
        Parameters:
        in - REQUIRED (when type is apiKey). The location of the API key. Valid values are "query", "header" or "cookie".
        Returns:
        The current builder
      • withBearerFormat

        public SecuritySchemeObjectBuilder withBearerFormat​(java.lang.String bearerFormat)
        Parameters:
        bearerFormat - A hint to the client to identify how the bearer token is formatted. Bearer tokens are usually generated by an authorization server, so this information is primarily for documentation purposes.
        Returns:
        The current builder
      • withFlows

        public SecuritySchemeObjectBuilder withFlows​(OAuthFlowsObject flows)
        Parameters:
        flows - REQUIRED (when type is oauth2). An object containing configuration information for the flow types supported.
        Returns:
        The current builder
      • withOpenIdConnectUrl

        public SecuritySchemeObjectBuilder withOpenIdConnectUrl​(java.net.URI openIdConnectUrl)
        Parameters:
        openIdConnectUrl - REQUIRED (when type is openIdConnect). OpenId Connect URL to discover OAuth2 configuration values. This MUST be in the form of a URL.
        Returns:
        The current builder