AuthenticationDirective

pl.iterators.stir.server.directives.AuthenticationDirective
See theAuthenticationDirective companion object
trait AuthenticationDirective[T] extends Directive1[T]

Attributes

Companion
object
Source
SecurityDirectives.scala
Graph
Supertypes
class Directive[(T)]
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def optional: Directive1[Option[T]]

Returns a copy of this AuthenticationDirective that will provide Some(user) if credentials were supplied and otherwise None.

Returns a copy of this AuthenticationDirective that will provide Some(user) if credentials were supplied and otherwise None.

Attributes

Source
SecurityDirectives.scala
def withAnonymousUser(anonymous: T): Directive1[T]

Returns a copy of this AuthenticationDirective that uses the given object as the anonymous user which will be used if no credentials were supplied in the request.

Returns a copy of this AuthenticationDirective that uses the given object as the anonymous user which will be used if no credentials were supplied in the request.

Attributes

Source
SecurityDirectives.scala

Inherited methods

def &(magnet: ConjunctionMagnet[(T)]): Out

Joins two directives into one which extracts the concatenation of its base directive extractions. NOTE: Extraction joining is an O(N) operation with N being the number of extractions on the right-side.

Joins two directives into one which extracts the concatenation of its base directive extractions. NOTE: Extraction joining is an O(N) operation with N being the number of extractions on the right-side.

Alias for and.

Attributes

Inherited from:
Directive
Source
Directive.scala
def and(magnet: ConjunctionMagnet[(T)]): Out

Joins two directives into one which extracts the concatenation of its base directive extractions. NOTE: Extraction joining is an O(N) operation with N being the number of extractions on the right-side.

Joins two directives into one which extracts the concatenation of its base directive extractions. NOTE: Extraction joining is an O(N) operation with N being the number of extractions on the right-side.

Attributes

Inherited from:
Directive
Source
Directive.scala
def as[A](constructor: ConstructFromTuple[(T), A]): Directive1[A]

Converts this directive into one which, instead of a tuple of type L, creates an instance of type A (which is usually a case class).

Converts this directive into one which, instead of a tuple of type L, creates an instance of type A (which is usually a case class).

Attributes

Inherited from:
Directive
Source
Directive.scala
def or[R >: (T)](that: Directive[R]): Directive[R]

Joins two directives into one which runs the second directive if the first one rejects.

Joins two directives into one which runs the second directive if the first one rejects.

Attributes

Inherited from:
Directive
Source
Directive.scala
def recover[R >: (T) : Tuple](recovery: Seq[Rejection] => Directive[R]): Directive[R]

Creates a new directive that is able to recover from rejections that were produced by this Directive before the inner route was applied.

Creates a new directive that is able to recover from rejections that were produced by this Directive before the inner route was applied.

Attributes

Inherited from:
Directive
Source
Directive.scala
def recoverPF[R >: (T) : Tuple](recovery: PartialFunction[Seq[Rejection], Directive[R]]): Directive[R]

Variant of recover that only recovers from rejections handled by the given PartialFunction.

Variant of recover that only recovers from rejections handled by the given PartialFunction.

Attributes

Inherited from:
Directive
Source
Directive.scala
def tapply(f: ((T)) => Route): Route

Calls the inner route with a tuple of extracted values of type L.

Calls the inner route with a tuple of extracted values of type L.

tapply is short for "tuple-apply". Usually, you will use the regular apply method instead, which is added by an implicit conversion (see Directive.addDirectiveApply).

Attributes

Inherited from:
Directive
Source
Directive.scala
def tcollect[R](pf: PartialFunction[(T), R], rejections: Rejection*)(implicit tupler: Tupler[R]): Directive[Out]

If the given scala.PartialFunction is defined for the input, maps this directive with the given function, which can produce either a tuple or any other value. If it is not defined however, the returned directive will reject with the given rejections.

If the given scala.PartialFunction is defined for the input, maps this directive with the given function, which can produce either a tuple or any other value. If it is not defined however, the returned directive will reject with the given rejections.

Attributes

Inherited from:
Directive
Source
Directive.scala
def tfilter(predicate: ((T)) => Boolean, rejections: Rejection*): Directive[L]

Creates a new directive of the same type, which passes if the given predicate matches the current extractions or rejects with the given rejections.

Creates a new directive of the same type, which passes if the given predicate matches the current extractions or rejects with the given rejections.

Attributes

Inherited from:
Directive
Source
Directive.scala
def tflatMap[R : Tuple](f: ((T)) => Directive[R]): Directive[R]

Flatmaps this directive using the given function.

Flatmaps this directive using the given function.

Attributes

Inherited from:
Directive
Source
Directive.scala
def tmap[R](f: ((T)) => R)(implicit tupler: Tupler[R]): Directive[Out]

Maps over this directive using the given function, which can produce either a tuple or any other value (which will then we wrapped into a scala.Tuple1).

Maps over this directive using the given function, which can produce either a tuple or any other value (which will then we wrapped into a scala.Tuple1).

Attributes

Inherited from:
Directive
Source
Directive.scala
def trequire(predicate: ((T)) => Boolean, rejections: Rejection*): Directive0

Creates a new Directive0, which passes if the given predicate matches the current extractions or rejects with the given rejections.

Creates a new Directive0, which passes if the given predicate matches the current extractions or rejects with the given rejections.

Attributes

Inherited from:
Directive
Source
Directive.scala
def |[R >: (T)](that: Directive[R]): Directive[R]

Joins two directives into one which runs the second directive if the first one rejects.

Joins two directives into one which runs the second directive if the first one rejects.

Alias for or.

Attributes

Inherited from:
Directive
Source
Directive.scala

Implicits

Inherited implicits

implicit val ev: Tuple[(T)]

Attributes

Inherited from:
Directive
Source
Directive.scala