Trait

com.gu.pandomainauth.action

AuthActions

Related Doc: package action

Permalink

trait AuthActions extends PanDomainAuth

Linear Supertypes
PanDomainAuth, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AuthActions
  2. PanDomainAuth
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. trait AbstractApiAuthAction extends ActionBuilder[UserRequest]

    Permalink

    Abstraction for API auth actions allowing to mix in custom results for each of the different error scenarios.

  2. trait PlainErrorResponses extends AnyRef

    Permalink

Abstract Value Members

  1. abstract def authCallbackUrl: String

    Permalink

    The auth callback url.

    The auth callback url. This is where google will send the user after authentication. This action on this url should invoke processGoogleCallback

  2. abstract def domain: String

    Permalink
    Definition Classes
    PanDomainAuth
  3. abstract def system: String

    Permalink
    Definition Classes
    PanDomainAuth
  4. abstract def validateUser(authedUser: AuthenticatedUser): Boolean

    Permalink

    Returns true if the authed user is valid in the implementing system (meets your multifactor requirements, you recognise the email etc.).

    Returns true if the authed user is valid in the implementing system (meets your multifactor requirements, you recognise the email etc.).

    If your implementing application needs to audit logins / register new users etc then this ia also the place to do it (although in this case you should strongly consider setting cacheValidation to true).

    returns

    true if the user is valid in your app

Concrete 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. val ANTI_FORGERY_KEY: String

    Permalink
  5. object APIAuthAction extends AbstractApiAuthAction with PlainErrorResponses

    Permalink

    Action that ensures the user is logged in and validated.

    Action that ensures the user is logged in and validated.

    This action is for API / XHR type requests where the user can't be sent to the auth provider for auth. In the cases where the auth is not valid response codes are sent to the requesting app and the javascript that initiated the request should handle these appropriately

    If the user is not authed then a 401 response is sent, if the auth has expired then a 419 response is sent, if the user is authed but not allowed to perform the action a 403 is sent

    If the user is authed or has an expiry extension, a 200 is sent

  6. object AuthAction extends ActionBuilder[UserRequest]

    Permalink

    Action that ensures the user is logged in and validated.

    Action that ensures the user is logged in and validated.

    This action is for page load type requests where it is possible to send the user for auth and for them to interact with the auth provider. For API / XHR type requests use the APIAuthAction

    if the user is not authed or the auth has expired they are sent for authentication

  7. val GoogleAuth: GoogleAuth

    Permalink
  8. val LOGIN_ORIGIN_KEY: String

    Permalink

    A Play session key that stores the target URL that was being accessed when redirected for authentication

  9. lazy val actorSystem: ActorSystem

    Permalink
    Definition Classes
    PanDomainAuth
  10. def apiGracePeriod: Long

    Permalink

    Adding an expiry extension to APIAuthActions allows for a delay between an applications authentication and their respective API XHR calls expiring.

    Adding an expiry extension to APIAuthActions allows for a delay between an applications authentication and their respective API XHR calls expiring.

    By default this is 0 and thus disabled.

    This is particularly useful for SPAs where users have third party cookies disabled.

    returns

    the amount of delay between App and API expiry in milliseconds

  11. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  12. lazy val authSettings: Agent[PanDomainAuthSettings]

    Permalink
    Definition Classes
    PanDomainAuth
  13. def awsCredentialsProvider: AWSCredentialsProvider

    Permalink
    Definition Classes
    PanDomainAuth
  14. def awsRegion: Option[Region]

    Permalink
    Definition Classes
    PanDomainAuth
  15. lazy val bucket: S3Bucket

    Permalink
    Definition Classes
    PanDomainAuth
  16. def cacheValidation: Boolean

    Permalink

    By default the validity of the user is checked every request.

    By default the validity of the user is checked every request. If your validateUser implementation is expensive or has side effects you can override this to true and validity will only be checked the first time the user visits your app after their login is established.

    Note the the cache is invalidated after the user's session is re-established with google.

    returns

    true if you want to only check the validity of the user once for the lifetime of the user's auth session

  17. def checkMultifactor(authedUser: AuthenticatedUser): Boolean

    Permalink
  18. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  19. lazy val domainSettingsRefreshActor: ActorRef

    Permalink
    Definition Classes
    PanDomainAuth
  20. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  22. def extractAuth(request: RequestHeader): AuthenticationStatus

    Permalink

    Extract the authentication status from the request.

  23. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  24. def flushCookie(result: Result): Result

    Permalink
  25. def generateCookies(authedUser: AuthenticatedUser): List[Cookie]

    Permalink
  26. final def getClass(): Class[_]

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

    Permalink
    Definition Classes
    AnyRef → Any
  28. def includeSystemInCookie(authedUser: AuthenticatedUser)(result: Result): Result

    Permalink
  29. def invalidUserMessage(claimedAuth: AuthenticatedUser): String

    Permalink

    Generates the message shown to the user when user validation fails.

    Generates the message shown to the user when user validation fails. override this to add a custom error message

  30. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  31. val multifactorChecker: Option[Google2FAGroupChecker]

    Permalink
  32. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  35. def processGoogleCallback()(implicit request: RequestHeader): Future[Result]

    Permalink
  36. def processLogout(implicit request: RequestHeader): Result

    Permalink
  37. def proxyConfiguration: Option[ProxyConfiguration]

    Permalink
    Definition Classes
    PanDomainAuth
  38. def readAuthenticatedUser(request: RequestHeader): Option[AuthenticatedUser]

    Permalink
  39. def readCookie(request: RequestHeader): Option[Cookie]

    Permalink
  40. def sendForAuth[A](implicit request: RequestHeader, email: Option[String] = None): Future[Result]

    Permalink

    starts the authentication process for a user.

    starts the authentication process for a user. By default this just sends the user off to google for auth but if you want to show welcome page with a button on it then override.

  41. def settings: PanDomainAuthSettings

    Permalink
    Definition Classes
    PanDomainAuth
  42. lazy val settingsMap: Map[String, String]

    Permalink
    Definition Classes
    PanDomainAuth
  43. def showUnauthedMessage(message: String)(implicit request: RequestHeader): Result

    Permalink

    invoked when the user is not logged in a can't be authed - this may be when the user is not valid in yur system or when they have exoplicitly logged out.

    invoked when the user is not logged in a can't be authed - this may be when the user is not valid in yur system or when they have exoplicitly logged out.

    Override this to add a logged out screen and display maeesages for your app. The default implementation is to ust return a 403 response

  44. def shutdown: Future[Terminated]

    Permalink
    Definition Classes
    PanDomainAuth
  45. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  47. final def wait(): Unit

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

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

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

Inherited from PanDomainAuth

Inherited from AnyRef

Inherited from Any

Ungrouped