Trait/Object

com.mohiva.play.silhouette.api.services

AuthenticatorService

Related Docs: object AuthenticatorService | package services

Permalink

trait AuthenticatorService[T <: Authenticator] extends ExecutionContextProvider

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. ExecutionContextProvider
  3. AnyRef
  4. Any
  1. Hide All
  2. Show all
Visibility
  1. Public
  2. All

Abstract Value Members

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

    Permalink

    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: Result)(implicit request: RequestHeader): Future[AuthenticatorResult]

    Permalink

    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.

  3. abstract def embed(value: T.Value, request: RequestHeader): RequestHeader

    Permalink

    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: Result)(implicit request: RequestHeader): Future[AuthenticatorResult]

    Permalink

    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. implicit abstract val executionContext: ExecutionContext

    Permalink

    The execution context to handle the asynchronous operations.

    The execution context to handle the asynchronous operations.

    Definition Classes
    ExecutionContextProvider
  6. abstract def init(authenticator: T)(implicit request: RequestHeader): Future[T.Value]

    Permalink

    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.

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

    Permalink

    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.

  8. abstract def renew(authenticator: T)(implicit request: RequestHeader): Future[T.Value]

    Permalink

    Renews the expiration of an authenticator without embedding it into the result.

    Renews the expiration of an authenticator without embedding it into the result.

    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 returned.

    authenticator

    The authenticator to renew.

    request

    The request header.

    returns

    The serialized expression of the authenticator.

  9. abstract def retrieve(implicit request: RequestHeader): Future[Option[T]]

    Permalink

    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.

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

    Permalink

    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.

  11. abstract def update(authenticator: T, result: Result)(implicit request: RequestHeader): Future[AuthenticatorResult]

    Permalink

    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.

Concrete 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. final def asInstanceOf[T0]: T0

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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. final def eq(arg0: AnyRef): Boolean

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

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

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

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

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

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

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

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

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

    Permalink
    Definition Classes
    AnyRef
  16. def toString(): String

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

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

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

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from ExecutionContextProvider

Inherited from AnyRef

Inherited from Any

Ungrouped