p

com.alexitc

playsonify

package playsonify

Ordering
  1. Alphabetic
Visibility
  1. Public
  2. All

Type Members

  1. trait AbstractAuthenticatorService [+A] extends AnyRef

    Allow to authenticate a request and map it to a value with type T.

    Allow to authenticate a request and map it to a value with type T.

    A dummy service that gets the user id from the "Authorization" header or uses -1 when the header is not present could look like this, NEVER USE THIS PIECE OF CODE:

    class DummyAuthenticatorService extends AbstractAuthenticatorService {
      override def authenticate[A](request: Request[A]): FutureApplicationResult[Int] = {
        val userId = request.headers.get(HeaderNames.AUTHORIZATION).map(_.toInt).getOrElse(-1)
        Future.successful { Good(userId) }
      }
    }
    A

    the type representing what is useful to use in your controllers as the user or credentials.

  2. abstract class AbstractJsonController [+A] extends MessagesBaseController

    Abstract Controller designed to process actions that expect an input model and computes an output model.

    Abstract Controller designed to process actions that expect an input model and computes an output model.

    The controller handles the json serialization and deserialization as well as the error responses and http status codes.

    A common way for using this class is like:

    class MyController @Inject() (components: MyJsonControllerComponents)
        extends MyJsonController(components) {
    
      ...
    }

    Where MyJsonControllerComponents is a custom implementation for JsonControllerComponents and MyJsonController is the custom implementation for AbstractJsonController.

    A

    the value type for an authenticated request, like User or UserId.

  3. trait JsonControllerComponents [+A] extends AnyRef

    The components that define the behavior of your controllers.

    The components that define the behavior of your controllers.

    A

    the type used on successful authenticated requests.

  4. class PublicErrorRenderer extends AnyRef

Value Members

  1. object PublicErrorRenderer

Ungrouped