Trait

com.mle.play.controllers

BaseSecurity

Related Doc: package controllers

Permalink

trait BaseSecurity extends Log

Linear Supertypes
Log, AnyRef, Any
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. BaseSecurity
  2. Log
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

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 AuthAction(f: (AuthRequest[AnyContent]) ⇒ Result): EssentialAction

    Permalink
  5. def AuthActionAsync(f: (AuthRequest[AnyContent]) ⇒ Future[Result]): EssentialAction

    Permalink
  6. def Authenticated(f: (AuthResult) ⇒ EssentialAction): EssentialAction

    Permalink
  7. def Authenticated(f: ⇒ EssentialAction): EssentialAction

    Permalink
  8. def AuthenticatedLogged(f: ⇒ EssentialAction): EssentialAction

    Permalink
  9. def AuthenticatedLogged(f: (AuthResult) ⇒ EssentialAction): EssentialAction

    Permalink
  10. def Logged(action: EssentialAction): EssentialAction

    Permalink
  11. def Logged(user: AuthResult, f: (AuthResult) ⇒ EssentialAction): EssentialAction

    Permalink

    Logs authenticated requests.

  12. def LoggedSecureAction[U](authFunction: (RequestHeader) ⇒ Option[U])(authAction: (U) ⇒ EssentialAction): EssentialAction

    Permalink
  13. def LoggedSecureActionAsync[U](authFunction: (RequestHeader) ⇒ Future[U])(authAction: (U) ⇒ EssentialAction): EssentialAction

    Permalink
  14. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  15. def authenticate(implicit request: RequestHeader): Future[Option[AuthResult]]

    Permalink

    Retrieves the authenticated username from the request.

    Retrieves the authenticated username from the request.

    Attempts to read the "username" session variable, but if no such thing exists, attempts to authenticate based on the the HTTP Authorization header, finally if that also fails, authenticates based on credentials in the query string.

    returns

    the authentication result wrapped in an scala.Option if successfully authenticated, scala.None otherwise

  16. def authenticateFromHeader(implicit request: RequestHeader): Future[Option[String]]

    Permalink

    Basic HTTP authentication.

    Basic HTTP authentication.

    The "Authorization" request header should be like: "Basic base64(username:password)", where base64(x) means x base64-encoded.

    request

    request from which the Authorization header is validated

    returns

    the username wrapped in an Option if successfully authenticated, None otherwise

  17. def authenticateFromQueryString(implicit request: RequestHeader): Future[Option[String]]

    Permalink

    Authenticates based on the "u" and "p" query string parameters.

    Authenticates based on the "u" and "p" query string parameters.

    request

    request

    returns

    the username, if successfully authenticated

  18. def authenticateFromSession(implicit request: RequestHeader): Future[Option[String]]

    Permalink
  19. def authenticatedAsync[A](auth: (RequestHeader) ⇒ Future[Option[A]], onUnauthorized: (RequestHeader) ⇒ Result)(action: (A) ⇒ EssentialAction): EssentialAction

    Permalink

    Async version of Security.Authenticated.

    Async version of Security.Authenticated.

    A

    type of user+request

    auth

    auth function

    onUnauthorized

    callback if auth fails

    action

    authenticated action

    returns

    an authenticated action

  20. def authenticatedAsync2[A](authFunction: (RequestHeader) ⇒ Future[A], onUnauthorized: (RequestHeader) ⇒ Result)(action: (A) ⇒ EssentialAction): EssentialAction

    Permalink

    authFunction

    authentication that fails the Future if authentication fails

    returns

    an authenticated action

  21. def checkOrElse[T, U >: T](f: Future[T], orElse: ⇒ Future[U], check: (T) ⇒ Boolean): Future[U]

    Permalink
  22. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  23. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  24. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  25. def finalize(): Unit

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

    Permalink
    Definition Classes
    AnyRef → Any
  27. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  28. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  29. def lift(user: String): AuthResult

    Permalink
    Attributes
    protected
  30. val log: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    Log
  31. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  34. def onUnauthorized(implicit req: RequestHeader): Result

    Permalink

    Called when an unauthorized request has been made.

    Called when an unauthorized request has been made. Also called when a failed authentication attempt is made.

    Returns HTTP 401 by default; override to handle unauthorized requests in a more app-specific manner.

    req

    header of request which failed authentication

    returns

    "auth failed" result

    Attributes
    protected
  35. def performAuthentication(creds: Option[BasicCredentials]): Future[Option[String]]

    Permalink
  36. def saveFiles(request: Request[MultipartFormData[TemporaryFile]]): Seq[Path]

    Permalink
    Attributes
    protected
  37. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  38. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  39. val uploadDir: Path

    Permalink
  40. def validateCredentials(creds: BasicCredentials): Future[Boolean]

    Permalink

    Override if you intend to use password authentication.

    Override if you intend to use password authentication.

    returns

    True if the credentials are valid; false otherwise. False by default.

  41. def validateUser(creds: BasicCredentials): Future[Option[String]]

    Permalink
  42. final def wait(): Unit

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

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

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

Inherited from Log

Inherited from AnyRef

Inherited from Any

Ungrouped