com.mohiva.play.silhouette.impl.authenticators

JWTAuthenticator

case class JWTAuthenticator(id: String, loginInfo: LoginInfo, lastUsedDate: DateTime, expirationDate: DateTime, idleTimeout: Option[Int], customClaims: Option[JsObject] = scala.None) extends StorableAuthenticator with Product with Serializable

An authenticator that uses a header based approach with the help of a JWT. It works by using a JWT to transport the authenticator data inside a user defined header. It can be stateless with the disadvantages that the JWT can't be invalidated.

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. If this feature is activated then a new token will be generated on every update. Make sure your application can handle this case.

id

The authenticator ID.

loginInfo

The linked login info for an identity.

lastUsedDate

The last used timestamp.

expirationDate

The expiration time.

idleTimeout

The time in seconds an authenticator can be idle before it timed out.

customClaims

Custom claims to embed into the token.

See also

https://developer.atlassian.com/static/connect/docs/concepts/understanding-jwt.html

http://self-issued.info/docs/draft-ietf-oauth-json-web-token.html#Claims

Linear Supertypes
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. JWTAuthenticator
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. StorableAuthenticator
  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 JWTAuthenticator(id: String, loginInfo: LoginInfo, lastUsedDate: DateTime, expirationDate: DateTime, idleTimeout: Option[Int], customClaims: Option[JsObject] = scala.None)

    id

    The authenticator ID.

    loginInfo

    The linked login info for an identity.

    lastUsedDate

    The last used timestamp.

    expirationDate

    The expiration time.

    idleTimeout

    The time in seconds an authenticator can be idle before it timed out.

    customClaims

    Custom claims to embed into the token.

Type Members

  1. 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
    JWTAuthenticatorAuthenticator

Value Members

  1. final def !=(arg0: AnyRef): Boolean

    Definition Classes
    AnyRef
  2. final def !=(arg0: Any): Boolean

    Definition Classes
    Any
  3. final def ##(): Int

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

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

    Definition Classes
    Any
  6. final def asInstanceOf[T0]: T0

    Definition Classes
    Any
  7. def clone(): AnyRef

    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  8. val customClaims: Option[JsObject]

    Custom claims to embed into the token.

  9. def discard(result: Future[Result]): Future[Result]

    Discards an authenticator.

    Discards an authenticator.

    result

    The result to wrap into the com.mohiva.play.silhouette.api.Authenticator.Discard result.

    returns

    A com.mohiva.play.silhouette.api.Authenticator.Discard result.

    Definition Classes
    Authenticator
  10. def discard(result: Result): Result

    Discards an authenticator.

    Discards an authenticator.

    result

    The result to wrap into the com.mohiva.play.silhouette.api.Authenticator.Discard result.

    returns

    A com.mohiva.play.silhouette.api.Authenticator.Discard result.

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

    Definition Classes
    AnyRef
  12. val expirationDate: DateTime

    The expiration time.

  13. def finalize(): Unit

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

    Definition Classes
    AnyRef → Any
  15. val id: String

    The authenticator ID.

    The authenticator ID.

    Definition Classes
    JWTAuthenticatorStorableAuthenticator
  16. val idleTimeout: Option[Int]

    The time in seconds an authenticator can be idle before it timed out.

  17. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  18. 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
    JWTAuthenticatorAuthenticator
  19. val lastUsedDate: DateTime

    The last used timestamp.

  20. val loginInfo: LoginInfo

    The linked login info for an identity.

    The linked login info for an identity.

    Definition Classes
    JWTAuthenticatorAuthenticator
  21. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  24. def renew(result: Future[Result]): Future[Result]

    Renews an authenticator.

    Renews an authenticator.

    result

    The result to wrap into the com.mohiva.play.silhouette.api.Authenticator.Renew result.

    returns

    A com.mohiva.play.silhouette.api.Authenticator.Renew result.

    Definition Classes
    Authenticator
  25. def renew(result: Result): Result

    Renews an authenticator.

    Renews an authenticator.

    result

    The result to wrap into the com.mohiva.play.silhouette.api.Authenticator.Renew result.

    returns

    A com.mohiva.play.silhouette.api.Authenticator.Renew result.

    Definition Classes
    Authenticator
  26. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  27. final def wait(): Unit

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from StorableAuthenticator

Inherited from Authenticator

Inherited from AnyRef

Inherited from Any

Ungrouped