securesocial.core.authenticator

HttpHeaderAuthenticator

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

A http header based authenticator. This authenticator works using the X-Auth-Token header in the http request to track authenticated users. Since the token is only an id the rest of the user 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, HttpHeaderAuthenticator[U]], Authenticator[U], AnyRef, Any
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. HttpHeaderAuthenticator
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. StoreBackedAuthenticator
  7. Authenticator
  8. AnyRef
  9. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Instance Constructors

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

    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

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

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

    Definition Classes
    AnyRef → Any
  4. val absoluteTimeoutInSeconds: Int

    The time an authenticator is allowed to live in the store

    The time an authenticator is allowed to live in the store

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

    Definition Classes
    Any
  6. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. val creationDate: DateTime

    the authenticator creation time

    the authenticator creation time

    Definition Classes
    HttpHeaderAuthenticatorAuthenticator
  8. def discarding(javaContext: Context): Future[Unit]

    Ends an authenticator session.

    Ends an authenticator session. This is invoked when the authenticator becomes invalid (for Java actions)

    javaContext

    the current http context

    returns

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

    Definition Classes
    StoreBackedAuthenticatorAuthenticator
  9. def discarding(result: Result): Future[Result]

    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
    StoreBackedAuthenticatorAuthenticator
  10. final def eq(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  11. implicit val executionContext: ExecutionContext

    Definition Classes
    StoreBackedAuthenticator
  12. val expirationDate: DateTime

    the expiration date

    the expiration date

    Definition Classes
    HttpHeaderAuthenticatorAuthenticator
  13. def expired: Boolean

    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
  14. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  16. val id: String

    the authenticator id

    the authenticator id

    Definition Classes
    HttpHeaderAuthenticatorAuthenticator
  17. val idleTimeoutInMinutes: Int

    The inactivity period after which an authenticator is considered invalid

    The inactivity period after which an authenticator is considered invalid

    Definition Classes
    HttpHeaderAuthenticatorStoreBackedAuthenticator
  18. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  19. def isValid: Boolean

    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
  20. val lastUsed: DateTime

    the last time the authenticator was used

    the last time the authenticator was used

    Definition Classes
    HttpHeaderAuthenticatorAuthenticator
  21. val logger: Logger

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

    Definition Classes
    AnyRef
  23. final def notify(): Unit

    Definition Classes
    AnyRef
  24. final def notifyAll(): Unit

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

    Starts an authenticated session by returning a json with the authenticator id

    Starts an authenticated session by returning a json with the authenticator id

    result

    the result that is about to be sent to the client

    returns

    the result with the authenticator header set

    Definition Classes
    HttpHeaderAuthenticatorAuthenticator
  26. val store: AuthenticatorStore[HttpHeaderAuthenticator[U]]

    the authenticator store where instances of this authenticator are persisted

    the authenticator store where instances of this authenticator are persisted

    Definition Classes
    HttpHeaderAuthenticatorStoreBackedAuthenticator
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  28. def timedOut: Boolean

    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
  29. def touch: Future[HttpHeaderAuthenticator[U]]

    Updated the last used timestamp

    Updated the last used timestamp

    returns

    a future with the updated authenticator

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

    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
  31. def touching(result: Result): Future[Result]

    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

    result
    returns

    Definition Classes
    StoreBackedAuthenticatorAuthenticator
  32. def updateUser(user: U): Future[HttpHeaderAuthenticator[U]]

    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
  33. val user: U

    the user this authenticator is associated with

    the user this authenticator is associated with

    Definition Classes
    HttpHeaderAuthenticatorAuthenticator
  34. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  37. def withLastUsedTime(time: DateTime): HttpHeaderAuthenticator[U]

    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
    HttpHeaderAuthenticatorStoreBackedAuthenticator
  38. def withUser(user: U): HttpHeaderAuthenticator[U]

    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
    HttpHeaderAuthenticatorStoreBackedAuthenticator

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from Authenticator[U]

Inherited from AnyRef

Inherited from Any

Ungrouped