Class

com.mohiva.play.silhouette.api.actions

SecuredRequestHandlerBuilder

Related Doc: package actions

Permalink

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.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SecuredRequestHandlerBuilder
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. RequestHandlerBuilder
  7. ExecutionContextProvider
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SecuredRequestHandlerBuilder(environment: Environment[E], errorHandler: SecuredErrorHandler, authorization: Option[Authorization[E.I, E.A]])

    Permalink

    environment

    The environment instance to handle the request.

    errorHandler

    The instance of the secured error handler.

    authorization

    Maybe an authorization instance.

Type Members

  1. implicit class ExtractEither[T] extends AnyRef

    Permalink

    Provides an extract method on an Either which contains the same types.

    Provides an extract method on an Either which contains the same types.

    Attributes
    protected
    Definition Classes
    RequestHandlerBuilder

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. def apply(authorization: Authorization[E.I, E.A]): SecuredRequestHandlerBuilder[E]

    Permalink

    Creates a secured action handler builder with an authorization in place.

    Creates a secured action handler builder with an authorization in place.

    authorization

    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.

  5. def apply(errorHandler: SecuredErrorHandler): SecuredRequestHandlerBuilder[E]

    Permalink

    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.

    errorHandler

    An error handler instance.

    returns

    A secured action handler builder with a new error handler in place.

  6. final def apply[B, T](request: Request[B])(block: (SecuredRequest[E, B]) ⇒ Future[HandlerResult[T]]): Future[HandlerResult[T]]

    Permalink

    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
  7. final def apply[T](block: (SecuredRequest[E, AnyContent]) ⇒ Future[HandlerResult[T]])(implicit request: Request[AnyContent]): Future[HandlerResult[T]]

    Permalink

    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
  8. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  9. val authorization: Option[Authorization[E.I, E.A]]

    Permalink

    Maybe an authorization instance.

  10. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  11. val environment: Environment[E]

    Permalink

    The environment instance to handle the request.

    The environment instance to handle the request.

    Definition Classes
    SecuredRequestHandlerBuilderRequestHandlerBuilder
  12. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  13. val errorHandler: SecuredErrorHandler

    Permalink

    The instance of the secured error handler.

  14. implicit lazy val executionContext: ExecutionContext

    Permalink

    The execution context to handle the asynchronous operations.

    The execution context to handle the asynchronous operations.

    Definition Classes
    RequestHandlerBuilderExecutionContextProvider
  15. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  16. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  17. def handleAuthentication[B](implicit request: Request[B]): Future[(Option[Either[E.A, E.A]], Option[E.I])]

    Permalink

    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
  18. def handleBlock[T](authenticator: Either[E.A, E.A], block: (E.A) ⇒ Future[HandlerResult[T]])(implicit request: RequestHeader): Future[HandlerResult[T]]

    Permalink

    Handles a block for an authenticator.

    Handles a block for an authenticator.

    Invokes the block with the authenticator and handles the result. See handleInitializedAuthenticator and handleUninitializedAuthenticator methods 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
  19. def invokeBlock[B, T](block: (SecuredRequest[E, B]) ⇒ Future[HandlerResult[T]])(implicit request: Request[B]): Future[HandlerResult[T]]

    Permalink

    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
    SecuredRequestHandlerBuilderRequestHandlerBuilder
  20. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  21. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  22. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  23. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  24. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  25. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  26. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  27. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from RequestHandlerBuilder[E, [B]SecuredRequest[E, B]]

Inherited from ExecutionContextProvider

Inherited from AnyRef

Inherited from Any

Ungrouped