com.mohiva.play.silhouette.api.services

AuthenticatorService

trait AuthenticatorService[T <: Authenticator] extends AnyRef

Handles authenticators for the Silhouette module.

T

The type of the authenticator this service is responsible for.

Linear Supertypes
Known Subclasses
Ordering
  1. Alphabetic
  2. By inheritance
Inherited
  1. AuthenticatorService
  2. AnyRef
  3. Any
  1. Hide All
  2. Show all
Learn more about member selection
Visibility
  1. Public
  2. All

Type Members

  1. case class AdditionalHeaders(existing: Headers, additional: Seq[(String, Seq[String])]) extends Headers with Product with Serializable

    Used to add additional headers to the existing headers.

Abstract Value Members

  1. abstract def create(loginInfo: LoginInfo)(implicit request: RequestHeader): Future[T]

    Creates a new authenticator for the specified login info.

    Creates a new authenticator for the specified login info.

    loginInfo

    The login info for which the authenticator should be created.

    request

    The request header.

    returns

    An authenticator.

  2. abstract def discard(authenticator: T, result: Future[Result])(implicit request: RequestHeader): Future[Result]

    Manipulates the response and removes authenticator specific artifacts before sending it to the client.

    Manipulates the response and removes authenticator specific artifacts before sending it to the client.

    authenticator

    The authenticator instance.

    result

    The result to manipulate.

    request

    The request header.

    returns

    The manipulated result.

    Attributes
    protected[com.mohiva.play.silhouette]
  3. abstract def embed(value: T.Value, request: RequestHeader): RequestHeader

    Embeds authenticator specific artifacts into the request.

    Embeds authenticator specific artifacts into the request.

    This method can be used to embed an authenticator in a existing request. This can be useful in Play filters. So before executing a SecuredAction we can embed the authenticator in the request to lead the action to believe that the request is a new request which contains a valid authenticator.

    If an existing authenticator exists, then it will be overridden.

    value

    The authenticator value to embed.

    request

    The request header.

    returns

    The manipulated request header.

  4. abstract def embed(value: T.Value, result: Future[Result])(implicit request: RequestHeader): Future[Result]

    Embeds authenticator specific artifacts into the response.

    Embeds authenticator specific artifacts into the response.

    value

    The authenticator value to embed.

    result

    The result to manipulate.

    request

    The request header.

    returns

    The manipulated result.

  5. abstract def init(authenticator: T)(implicit request: RequestHeader): Future[T.Value]

    Initializes an authenticator and instead of embedding into the the request or result, it returns the serialized value.

    Initializes an authenticator and instead of embedding into the the request or result, it returns the serialized value.

    authenticator

    The authenticator instance.

    request

    The request header.

    returns

    The serialized authenticator value.

  6. abstract def renew(authenticator: T, result: Future[Result])(implicit request: RequestHeader): Future[Result]

    Renews the expiration of an authenticator.

    Renews the expiration of an authenticator.

    Based on the implementation, the renew method should revoke the given authenticator first, before creating a new one. If the authenticator was updated, then the updated artifacts should be embedded into the response.

    authenticator

    The authenticator to renew.

    result

    The result to manipulate.

    request

    The request header.

    returns

    The original or a manipulated result.

    Attributes
    protected[com.mohiva.play.silhouette]
  7. abstract def retrieve(implicit request: RequestHeader): Future[Option[T]]

    Retrieves the authenticator from request.

    Retrieves the authenticator from request.

    request

    The request header.

    returns

    Some authenticator or None if no authenticator could be found in request.

  8. abstract def touch(authenticator: T): Either[T, T]

    Touches an authenticator.

    Touches an authenticator.

    An authenticator can use sliding window expiration. This means that the authenticator times out after a certain time if it wasn't used. So to mark an authenticator as used it will be touched on every request to a Silhouette action. If an authenticator should not be touched because of the fact that sliding window expiration is disabled, then it should be returned on the right, otherwise it should be returned on the left. An untouched authenticator needn't be updated later by the update method.

    authenticator

    The authenticator to touch.

    returns

    The touched authenticator on the left or the untouched authenticator on the right.

    Attributes
    protected[com.mohiva.play.silhouette]
  9. abstract def update(authenticator: T, result: Future[Result])(implicit request: RequestHeader): Future[Result]

    Updates a touched authenticator.

    Updates a touched authenticator.

    If the authenticator was updated, then the updated artifacts should be embedded into the response. This method gets called on every subsequent request if an identity accesses a Silhouette action, expect the authenticator was not touched.

    authenticator

    The authenticator to update.

    result

    The result to manipulate.

    request

    The request header.

    returns

    The original or a manipulated result.

    Attributes
    protected[com.mohiva.play.silhouette]

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

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

    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

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

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

    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

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

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

    Definition Classes
    AnyRef
  17. final def synchronized[T0](arg0: ⇒ T0): T0

    Definition Classes
    AnyRef
  18. def toString(): String

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

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

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

    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from AnyRef

Inherited from Any

Ungrouped