final case class SecuredRequestHandlerBuilder[E <: Env](environment: Environment[E], errorHandler: SecuredErrorHandler, authorization: Option[Authorization[E.I, E.A]]) extends RequestHandlerBuilder[E, [B]SecuredRequest[E, B]] with Product with Serializable
Request handler builder implementation to provide the foundation for secured request handlers.
- E
The type of the environment.
- environment
The environment instance to handle the request.
- errorHandler
The instance of the secured error handler.
- authorization
Maybe an authorization instance.
- Alphabetic
- By Inheritance
- SecuredRequestHandlerBuilder
- Serializable
- Product
- Equals
- RequestHandlerBuilder
- ExecutionContextProvider
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Instance Constructors
- new SecuredRequestHandlerBuilder(environment: Environment[E], errorHandler: SecuredErrorHandler, authorization: Option[Authorization[E.I, E.A]])
- environment
The environment instance to handle the request.
- errorHandler
The instance of the secured error handler.
- authorization
Maybe an authorization instance.
Type Members
- implicit class ExtractEither[T] extends AnyRef
Provides an
extractmethod on anEitherwhich contains the same types.Provides an
extractmethod on anEitherwhich contains the same types.- Attributes
- protected
- Definition Classes
- RequestHandlerBuilder
Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- def apply(specifiedAuthorization: Authorization[E.I, E.A]): SecuredRequestHandlerBuilder[E]
Creates a secured action handler builder with an authorization in place.
Creates a secured action handler builder with an authorization in place.
- specifiedAuthorization
An authorization object that checks if the user is authorized to invoke the action.
- returns
A secured action handler builder with an authorization in place.
- def apply(securedErrorHandler: SecuredErrorHandler): SecuredRequestHandlerBuilder[E]
Creates a secured action handler builder with a new error handler in place.
Creates a secured action handler builder with a new error handler in place.
- securedErrorHandler
An error handler instance.
- returns
A secured action handler builder with a new error handler in place.
- final def apply[B, T](request: Request[B])(block: (SecuredRequest[E, B]) => Future[HandlerResult[T]]): Future[HandlerResult[T]]
Constructs a request handler with the content of the given request.
Constructs a request handler with the content of the given request.
- B
The type of the request body.
- T
The type of the data included in the handler result.
- request
The current request.
- block
The block of code to invoke.
- returns
A handler result.
- Definition Classes
- RequestHandlerBuilder
- final def apply[T](block: (SecuredRequest[E, AnyContent]) => Future[HandlerResult[T]])(implicit request: Request[AnyContent]): Future[HandlerResult[T]]
Constructs a request handler with default content.
Constructs a request handler with default content.
- T
The type of the data included in the handler result.
- block
The block of code to invoke.
- request
The current request.
- returns
A handler result.
- Definition Classes
- RequestHandlerBuilder
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- val authorization: Option[Authorization[E.I, E.A]]
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- val environment: Environment[E]
The environment instance to handle the request.
The environment instance to handle the request.
- Definition Classes
- SecuredRequestHandlerBuilder → RequestHandlerBuilder
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- val errorHandler: SecuredErrorHandler
- implicit lazy val executionContext: ExecutionContext
The execution context to handle the asynchronous operations.
The execution context to handle the asynchronous operations.
- Definition Classes
- RequestHandlerBuilder → ExecutionContextProvider
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def handleAuthentication[B](implicit request: Request[B]): Future[(Option[Either[E.A, E.A]], Option[E.I])]
Handles the authentication of an identity.
Handles the authentication of an identity.
As first it checks for authenticators in requests, then it tries to authenticate against a request provider. This method marks the returned authenticators by returning already initialized authenticators on the left and new authenticators on the right. All new authenticators must be initialized later in the flow, with the result returned from the invoked block.
- B
The type of the request body.
- request
The current request.
- returns
A tuple which consists of (maybe the existing authenticator on the left or a new authenticator on the right -> maybe the identity).
- Attributes
- protected
- Definition Classes
- RequestHandlerBuilder
- def handleBlock[T](authenticator: Either[E.A, E.A], block: (E.A) => Future[HandlerResult[T]])(implicit request: RequestHeader): Future[HandlerResult[T]]
Handles a block for an authenticator.
Handles a block for an authenticator.
Invokes the block with the authenticator and handles the result. See
handleInitializedAuthenticatorandhandleUninitializedAuthenticatormethods too see how the different authenticator types will be handled.- T
The type of the data included in the handler result.
- authenticator
An already initialized authenticator on the left and a new authenticator on the right.
- block
The block to handle with the authenticator.
- request
The current request header.
- returns
A handler result.
- Attributes
- protected
- Definition Classes
- RequestHandlerBuilder
- def invokeBlock[B, T](block: (SecuredRequest[E, B]) => Future[HandlerResult[T]])(implicit request: Request[B]): Future[HandlerResult[T]]
Invokes the block.
Invokes the block.
- B
The type of the request body.
- T
The type of the data included in the handler result.
- block
The block of code to invoke.
- request
The current request.
- returns
A handler result.
- Definition Classes
- SecuredRequestHandlerBuilder → RequestHandlerBuilder
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def productElementNames: Iterator[String]
- Definition Classes
- Product
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)