Class/Object

securesocial.core.authenticator

CookieAuthenticator

Related Docs: object CookieAuthenticator | package authenticator

Permalink

case class CookieAuthenticator[U](id: String, user: U, expirationDate: DateTime, lastUsed: DateTime, creationDate: DateTime, config: CookieConfig, store: AuthenticatorStore[CookieAuthenticator[U]]) extends StoreBackedAuthenticator[U, CookieAuthenticator[U]] with Product with Serializable

A Cookie based authenticator. This authenticator puts an id an a cookie that is then used to track authenticated users. Since the cookie only has the id for this authenticator the rest of the data is stored using an instance of the AuthenticatorStore.

U

the user type (defined by the application using the module)

id

the authenticator id

user

the user this authenticator is associated with

expirationDate

the expiration date

lastUsed

the last time the authenticator was used

creationDate

the authenticator creation time

store

the authenticator store where instances of this authenticator are persisted

See also

RuntimeEnvironment

AuthenticatorStore

Linear Supertypes
Serializable, Serializable, Product, Equals, StoreBackedAuthenticator[U, CookieAuthenticator[U]], Authenticator[U], AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CookieAuthenticator
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. StoreBackedAuthenticator
  7. Authenticator
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CookieAuthenticator(id: String, user: U, expirationDate: DateTime, lastUsed: DateTime, creationDate: DateTime, config: CookieConfig, store: AuthenticatorStore[CookieAuthenticator[U]])

    Permalink

    id

    the authenticator id

    user

    the user this authenticator is associated with

    expirationDate

    the expiration date

    lastUsed

    the last time the authenticator was used

    creationDate

    the authenticator creation time

    store

    the authenticator store where instances of this authenticator are persisted

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 absoluteTimeoutInSeconds: Int

    Permalink

    The time an authenticator is allowed to live in the store

    The time an authenticator is allowed to live in the store

    Definition Classes
    CookieAuthenticatorStoreBackedAuthenticator
  5. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  6. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val config: CookieConfig

    Permalink
  8. val creationDate: DateTime

    Permalink

    the authenticator creation time

    the authenticator creation time

    Definition Classes
    CookieAuthenticatorAuthenticator
  9. def discarding(javaContext: Context): Future[Unit]

    Permalink

    Removes the authenticator from the store and discards the cookie associated with it.

    Removes the authenticator from the store and discards the cookie associated with it.

    javaContext

    the current invocation context

    returns

    the current http context modified to signal the authenticator is no longer valid

    Definition Classes
    CookieAuthenticatorStoreBackedAuthenticatorAuthenticator
  10. def discarding(result: Result): Future[Result]

    Permalink

    Ends an authenticator session.

    Ends an authenticator session. This is invoked when the user logs out or if the authenticator becomes invalid (maybe due to a timeout)

    result

    the result that is about to be sent to the client.

    returns

    the result modified to signal the authenticator is no longer valid

    Definition Classes
    CookieAuthenticatorStoreBackedAuthenticatorAuthenticator
  11. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  12. implicit val executionContext: ExecutionContext

    Permalink
    Definition Classes
    StoreBackedAuthenticator
  13. val expirationDate: DateTime

    Permalink

    the expiration date

    the expiration date

    Definition Classes
    CookieAuthenticatorAuthenticator
  14. def expired: Boolean

    Permalink

    Checks if the authenticator has expired.

    Checks if the authenticator has expired. This is an absolute timeout since the creation of the authenticator

    returns

    true if the authenticator has expired, false otherwise.

    Definition Classes
    StoreBackedAuthenticator
  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. val id: String

    Permalink

    the authenticator id

    the authenticator id

    Definition Classes
    CookieAuthenticatorAuthenticator
  18. val idleTimeoutInMinutes: Int

    Permalink

    The inactivity period after which an authenticator is considered invalid

    The inactivity period after which an authenticator is considered invalid

    Definition Classes
    CookieAuthenticatorStoreBackedAuthenticator
  19. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  20. def isValid: Boolean

    Permalink

    Checks if the authenticator is valid.

    Checks if the authenticator is valid. For this implementation it means that the authenticator has not expired or timed out.

    returns

    true if the authenticator is valid, false otherwise.

    Definition Classes
    StoreBackedAuthenticatorAuthenticator
  21. val lastUsed: DateTime

    Permalink

    the last time the authenticator was used

    the last time the authenticator was used

    Definition Classes
    CookieAuthenticatorAuthenticator
  22. val logger: Logger

    Permalink
    Attributes
    protected
    Definition Classes
    StoreBackedAuthenticator
  23. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  26. def starting(result: Result): Future[Result]

    Permalink

    Starts an authenticated session by placing a cookie in the result

    Starts an authenticated session by placing a cookie in the result

    result

    the result that is about to be sent to the client

    returns

    the result with the authenticator cookie set

    Definition Classes
    CookieAuthenticatorAuthenticator
  27. val store: AuthenticatorStore[CookieAuthenticator[U]]

    Permalink

    the authenticator store where instances of this authenticator are persisted

    the authenticator store where instances of this authenticator are persisted

    Definition Classes
    CookieAuthenticatorStoreBackedAuthenticator
  28. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  29. def timedOut: Boolean

    Permalink

    Checks if the time elapsed since the last time the authenticator was used is longer than the maximum idle timeout specified in the properties.

    Checks if the time elapsed since the last time the authenticator was used is longer than the maximum idle timeout specified in the properties.

    returns

    true if the authenticator timed out, false otherwise.

    Definition Classes
    StoreBackedAuthenticator
  30. def touch: Future[CookieAuthenticator[U]]

    Permalink

    Updated the last used timestamp

    Updated the last used timestamp

    returns

    a future with the updated authenticator

    Definition Classes
    StoreBackedAuthenticatorAuthenticator
  31. def touching(javaContext: Context): Future[Unit]

    Permalink

    Adds a touched authenticator to the result(for Java).

    Adds a touched authenticator to the result(for Java). In this implementation there's no need to do anything with the result

    javaContext

    the current invocation context

    returns

    the http context modified with the updated authenticator

    Definition Classes
    StoreBackedAuthenticatorAuthenticator
  32. def touching(result: Result): Future[Result]

    Permalink

    Adds a touched authenticator to the result (for Scala).

    Adds a touched authenticator to the result (for Scala). In this implementation there's no need to do anything with the result

    Definition Classes
    StoreBackedAuthenticatorAuthenticator
  33. def updateUser(user: U): Future[CookieAuthenticator[U]]

    Permalink

    Updates the user information associated with this authenticator

    Updates the user information associated with this authenticator

    user

    the user object

    returns

    a future with the updated authenticator

    Definition Classes
    StoreBackedAuthenticatorAuthenticator
  34. val user: U

    Permalink

    the user this authenticator is associated with

    the user this authenticator is associated with

    Definition Classes
    CookieAuthenticatorAuthenticator
  35. final def wait(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  38. def withLastUsedTime(time: DateTime): CookieAuthenticator[U]

    Permalink

    Returns a copy of this authenticator with the given last used time

    Returns a copy of this authenticator with the given last used time

    time

    the new time

    returns

    the modified authenticator

    Definition Classes
    CookieAuthenticatorStoreBackedAuthenticator
  39. def withUser(user: U): CookieAuthenticator[U]

    Permalink

    Returns a copy of this Authenticator with the given user

    Returns a copy of this Authenticator with the given user

    user

    the new user

    returns

    the modified authenticator

    Definition Classes
    CookieAuthenticatorStoreBackedAuthenticator

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Authenticator[U]

Inherited from AnyRef

Inherited from Any

Ungrouped