Auth

sttp.tapir.EndpointInput.Auth
case class Auth[T, TYPE <: AuthType](input: Single[T], challenge: WWWAuthenticateChallenge, authType: TYPE, info: AuthInfo) extends Single[T]

An input with authentication credentials metadata, used when generating documentation.

Attributes

Graph
Supertypes
trait Serializable
trait Product
trait Equals
trait Single[T]
trait EndpointInput[T]
trait EndpointTransput[T]
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def attribute[A](k: AttributeKey[A]): Option[A]
def attribute[A](k: AttributeKey[A], v: A): Auth[T, TYPE]
def bearerFormat(f: String)(implicit typeIsHttp: TYPE =:= Http): Auth[T, Http]
def challengeRealm(realm: String): Auth[T, TYPE]
def description(d: String): Auth[T, TYPE]
def group(g: String): Auth[T, TYPE]

Authentication inputs in the same group will always become a single security requirement in the documentation (requiring all authentication methods), even if they are all optional.

Authentication inputs in the same group will always become a single security requirement in the documentation (requiring all authentication methods), even if they are all optional.

Attributes

override def map[U](mapping: Mapping[T, U]): Auth[U, TYPE]

Attributes

Definition Classes
def requiredScopes(requiredScopes: Seq[String])(implicit ev: TYPE =:= OAuth2): Auth[T, ScopedOAuth2]
def securitySchemeName: Option[String]
def securitySchemeName(name: String): Auth[T, TYPE]
override def show: String

Attributes

Definition Classes

Inherited methods

def /[U, TU](other: EndpointInput[U])(implicit concat: Aux[T, U, TU]): EndpointInput[TU]

Attributes

Inherited from:
EndpointInput
def and[U, TU](other: EndpointInput[U])(implicit concat: Aux[T, U, TU]): EndpointInput[TU]

Attributes

Inherited from:
EndpointInput
def map[U](f: T => U)(g: U => T): ThisType[U]

Attributes

Inherited from:
EndpointTransput
def mapDecode[U](f: T => DecodeResult[U])(g: U => T): ThisType[U]

Attributes

Inherited from:
EndpointTransput
inline def mapTo[CASE_CLASS <: Product](using mc: ProductOf[CASE_CLASS]): ThisType[CASE_CLASS]

Attributes

Inherited from:
EndpointTransputMacros
def mapValidate[U](v: Validator[T])(f: T => U)(g: U => T): ThisType[U]

Adds the given validator, and maps to the given higher-level type U.

Adds the given validator, and maps to the given higher-level type U.

Unlike a .validate(v).map(f)(g) invocation, during decoding the validator is run before applying the f function. If there are validation errors, decoding fails. However, the validator is then invoked again on the fully decoded value.

This is useful to create inputs/outputs for types, which are unrepresentable unless the validator's condition is met, e.g. due to preconditions in the constructor.

Attributes

See also
Inherited from:
EndpointTransput
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
def validate(v: Validator[T]): ThisType[T]

Adds a validator.

Adds a validator.

Note that validation is run on a fully decoded value. That is, during decoding, first the decoding functions are run, followed by validations. Hence any functions provided in subsequent .maps or .mapDecodes will be invoked before validation.

Attributes

See also
Inherited from:
EndpointTransput