Packages

c

play.silhouette.impl.authenticators

BearerTokenAuthenticator

case class BearerTokenAuthenticator(id: String, loginInfo: LoginInfo, lastUsedDateTime: ZonedDateTime, expirationDateTime: ZonedDateTime, idleTimeout: Option[FiniteDuration]) extends StorableAuthenticator with ExpirableAuthenticator with Product with Serializable

An authenticator that uses a header based approach with the help of a bearer token. It works by transporting a token in a user defined header to track the authenticated user and a server side backing store that maps the token to an authenticator instance.

The authenticator can use sliding window expiration. This means that the authenticator times out after a certain time if it wasn't used. This can be controlled with the idleTimeout property.

Note: If deploying to multiple nodes the backing store will need to synchronize.

id

The authenticator ID.

loginInfo

The linked login info for an identity.

lastUsedDateTime

The last used date/time.

expirationDateTime

The expiration date/time.

idleTimeout

The duration an authenticator can be idle before it timed out.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. BearerTokenAuthenticator
  2. Serializable
  3. Product
  4. Equals
  5. ExpirableAuthenticator
  6. StorableAuthenticator
  7. Authenticator
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Instance Constructors

  1. new BearerTokenAuthenticator(id: String, loginInfo: LoginInfo, lastUsedDateTime: ZonedDateTime, expirationDateTime: ZonedDateTime, idleTimeout: Option[FiniteDuration])

    id

    The authenticator ID.

    loginInfo

    The linked login info for an identity.

    lastUsedDateTime

    The last used date/time.

    expirationDateTime

    The expiration date/time.

    idleTimeout

    The duration an authenticator can be idle before it timed out.

Type Members

  1. abstract type Settings

    The type of the settings an authenticator can handle.

    The type of the settings an authenticator can handle.

    Definition Classes
    Authenticator
  2. type Value = String

    The Type of the generated value an authenticator will be serialized to.

    The Type of the generated value an authenticator will be serialized to.

    Definition Classes
    BearerTokenAuthenticatorAuthenticator

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. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. val expirationDateTime: ZonedDateTime

    The expiration date/time.

    The expiration date/time.

    Definition Classes
    BearerTokenAuthenticatorExpirableAuthenticator
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  9. val id: String

    Gets the ID to reference the authenticator in the backing store.

    Gets the ID to reference the authenticator in the backing store.

    returns

    The ID to reference the authenticator in the backing store.

    Definition Classes
    BearerTokenAuthenticatorStorableAuthenticator
  10. val idleTimeout: Option[FiniteDuration]

    The duration an authenticator can be idle before it timed out.

    The duration an authenticator can be idle before it timed out.

    Definition Classes
    BearerTokenAuthenticatorExpirableAuthenticator
  11. def isExpired: Boolean

    Checks if the authenticator is expired.

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

    returns

    True if the authenticator is expired, false otherwise.

    Definition Classes
    ExpirableAuthenticator
  12. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  13. def isTimedOut: 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 sliding window expiration is activated and the authenticator is timed out, false otherwise.

    Definition Classes
    ExpirableAuthenticator
  14. def isValid: Boolean

    Checks if the authenticator isn't expired and isn't timed out.

    Checks if the authenticator isn't expired and isn't timed out.

    returns

    True if the authenticator isn't expired and isn't timed out.

    Definition Classes
    ExpirableAuthenticatorAuthenticator
  15. val lastUsedDateTime: ZonedDateTime

    The last used date/time.

    The last used date/time.

    Definition Classes
    BearerTokenAuthenticatorExpirableAuthenticator
  16. val loginInfo: LoginInfo

    Gets the linked login info for an identity.

    Gets the linked login info for an identity.

    returns

    The linked login info for an identity.

    Definition Classes
    BearerTokenAuthenticatorAuthenticator
  17. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  20. def productElementNames: Iterator[String]
    Definition Classes
    Product
  21. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  22. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  23. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  24. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from ExpirableAuthenticator

Inherited from StorableAuthenticator

Inherited from Authenticator

Inherited from AnyRef

Inherited from Any

Ungrouped