SecurityScheme

zio.http.endpoint.openapi.OpenAPI.SecurityScheme
See theSecurityScheme companion trait

Attributes

Companion
trait
Graph
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type

Members list

Type members

Classlikes

final case class ApiKey(description: Option[Doc], name: String, in: In) extends SecurityScheme

Defines an HTTP security scheme that can be used by the operations.

Defines an HTTP security scheme that can be used by the operations.

Value parameters

description

A short description for security scheme.

in

The location of the API key.

name

The name of the header, query or cookie parameter to be used.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object ApiKey

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
ApiKey.type
final case class Http(description: Option[Doc], scheme: String, bearerFormat: Option[String]) extends SecurityScheme

Value 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.

description

A short description for security scheme.

scheme

The name of the HTTP Authorization scheme to be used in the Authorization header as defined in [RFC7235]. The values used SHOULD be registered in the IANA Authentication Scheme registry.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class OAuth2(description: Option[Doc], flows: OAuthFlows) extends SecurityScheme

Value parameters

description

A short description for security scheme.

flows

An object containing configuration information for the flow types supported.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
object OAuthFlow

Attributes

Companion
trait
Supertypes
trait Sum
trait Mirror
class Object
trait Matchable
class Any
Self type
OAuthFlow.type
sealed trait OAuthFlow

Attributes

Companion
object
Supertypes
class Object
trait Matchable
class Any
Known subtypes
final case class OAuthFlows(`implicit`: Option[Implicit], password: Option[Password], clientCredentials: Option[ClientCredentials], authorizationCode: Option[AuthorizationCode])

Allows configuration of the supported OAuth Flows.

Allows configuration of the supported OAuth Flows.

Value parameters

`implicit`

Configuration for the OAuth Implicit flow.

authorizationCode

Configuration for the OAuth Authorization Code flow. Previously called accessCode in OpenAPI 2.0.

clientCredentials

Configuration for the OAuth Client Credentials flow. Previously called application in OpenAPI 2.0.

password

Configuration for the OAuth Resource Owner Password flow

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class OpenIdConnect(description: Option[Doc], openIdConnectUrl: URI) extends SecurityScheme

Value parameters

description

A short description for security scheme.

openIdConnectUrl

OpenId Connect URL to discover OAuth2 configuration values.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all
final case class SecurityRequirement(securitySchemes: Map[String, List[String]])

Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object.

Lists the required security schemes to execute this operation. The name used for each property MUST correspond to a security scheme declared in the Security Schemes under the Components Object.

Security Requirement Objects that contain multiple schemes require that all schemes MUST be satisfied for a request to be authorized. This enables support for scenarios where multiple query parameters or HTTP headers are required to convey security information.

When a list of Security Requirement Objects is defined on the OpenAPI Object or Operation Object, only one of the Security Requirement Objects in the list needs to be satisfied to authorize the request.

Value parameters

securitySchemes

If the security scheme is of type "oauth2" or "openIdConnect", then the value is a list of scope names required for the execution, and the list MAY be empty if authorization does not require a specified scope. For other security scheme types, the List MUST be empty.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Inherited types

type MirroredElemLabels <: Tuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Mirror
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror

Implicits

Implicits

implicit val schema: Schema[SecurityScheme]