Class/Object

com.mohiva.play.silhouette.impl.authenticators

CookieAuthenticatorService

Related Docs: object CookieAuthenticatorService | package authenticators

Permalink

class CookieAuthenticatorService extends AuthenticatorService[CookieAuthenticator] with Logger

The service that handles the cookie authenticator.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CookieAuthenticatorService
  2. Logger
  3. AuthenticatorService
  4. ExecutionContextProvider
  5. AnyRef
  6. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CookieAuthenticatorService(settings: CookieAuthenticatorSettings, repository: Option[AuthenticatorRepository[CookieAuthenticator]], signer: Signer, cookieHeaderEncoding: CookieHeaderEncoding, authenticatorEncoder: AuthenticatorEncoder, fingerprintGenerator: FingerprintGenerator, idGenerator: IDGenerator, clock: Clock)(implicit executionContext: ExecutionContext)

    Permalink

    settings

    The cookie settings.

    repository

    The repository to persist the authenticator. Set it to None to use a stateless approach.

    signer

    The signer implementation.

    cookieHeaderEncoding

    Logic for encoding and decoding Cookie and Set-Cookie headers.

    authenticatorEncoder

    The authenticator encoder.

    fingerprintGenerator

    The fingerprint generator implementation.

    idGenerator

    The ID generator used to create the authenticator ID.

    clock

    The clock implementation.

    executionContext

    The execution context to handle the asynchronous operations.

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. def create(loginInfo: LoginInfo)(implicit request: RequestHeader): Future[CookieAuthenticator]

    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.

    Definition Classes
    CookieAuthenticatorServiceAuthenticatorService
  7. def discard(authenticator: CookieAuthenticator, result: Result)(implicit request: RequestHeader): Future[AuthenticatorResult]

    Permalink

    Discards the cookie.

    Discards the cookie.

    If the stateful approach will be used then the authenticator will also be removed from backing store.

    authenticator

    The authenticator instance.

    result

    The result to manipulate.

    request

    The request header.

    returns

    The manipulated result.

    Definition Classes
    CookieAuthenticatorServiceAuthenticatorService
  8. def embed(cookie: Cookie, request: RequestHeader): RequestHeader

    Permalink

    Embeds the cookie into the request.

    Embeds the cookie into the request.

    cookie

    The cookie to embed.

    request

    The request header.

    returns

    The manipulated request header.

    Definition Classes
    CookieAuthenticatorServiceAuthenticatorService
  9. def embed(cookie: Cookie, result: Result)(implicit request: RequestHeader): Future[AuthenticatorResult]

    Permalink

    Embeds the cookie into the result.

    Embeds the cookie into the result.

    cookie

    The cookie to embed.

    result

    The result to manipulate.

    request

    The request header.

    returns

    The manipulated result.

    Definition Classes
    CookieAuthenticatorServiceAuthenticatorService
  10. final def eq(arg0: AnyRef): Boolean

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

    Permalink
    Definition Classes
    AnyRef → Any
  12. implicit val executionContext: ExecutionContext

    Permalink

    The execution context to handle the asynchronous operations.

    The execution context to handle the asynchronous operations.

    Definition Classes
    CookieAuthenticatorServiceExecutionContextProvider
  13. def finalize(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  16. def init(authenticator: CookieAuthenticator)(implicit request: RequestHeader): Future[Cookie]

    Permalink

    Creates a new cookie for the given authenticator and return it.

    Creates a new cookie for the given authenticator and return it.

    If the stateful approach will be used the the authenticator will also be stored in the backing store.

    authenticator

    The authenticator instance.

    request

    The request header.

    returns

    The serialized authenticator value.

    Definition Classes
    CookieAuthenticatorServiceAuthenticatorService
  17. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  18. val logger: Logger

    Permalink

    A named logger instance.

    A named logger instance.

    Definition Classes
    Logger
  19. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  22. def renew(authenticator: CookieAuthenticator, result: Result)(implicit request: RequestHeader): Future[AuthenticatorResult]

    Permalink

    Renews an authenticator and replaces the authenticator cookie with a new one.

    Renews an authenticator and replaces the authenticator cookie with a new one.

    If the stateful approach will be used then the old authenticator will be revoked in the backing store. After that it isn't possible to use a cookie which was bound to this authenticator.

    authenticator

    The authenticator to update.

    result

    The result to manipulate.

    request

    The request header.

    returns

    The original or a manipulated result.

    Definition Classes
    CookieAuthenticatorServiceAuthenticatorService
  23. def renew(authenticator: CookieAuthenticator)(implicit request: RequestHeader): Future[Cookie]

    Permalink

    Renews an authenticator.

    Renews an authenticator.

    After that it isn't possible to use a cookie which was bound to this authenticator. This method doesn't embed the the authenticator into the result. This must be done manually if needed or use the other renew method otherwise.

    authenticator

    The authenticator to renew.

    request

    The request header.

    returns

    The serialized expression of the authenticator.

    Definition Classes
    CookieAuthenticatorServiceAuthenticatorService
  24. def retrieve[B](implicit request: ExtractableRequest[B]): Future[Option[CookieAuthenticator]]

    Permalink

    Retrieves the authenticator from request.

    Retrieves the authenticator from request.

    B

    The type of the request body.

    request

    The request to retrieve the authenticator from.

    returns

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

    Definition Classes
    CookieAuthenticatorServiceAuthenticatorService
  25. final def synchronized[T0](arg0: ⇒ T0): T0

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

    Permalink
    Definition Classes
    AnyRef → Any
  27. def touch(authenticator: CookieAuthenticator): Either[CookieAuthenticator, CookieAuthenticator]

    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.

    Definition Classes
    CookieAuthenticatorServiceAuthenticatorService
  28. def update(authenticator: CookieAuthenticator, result: Result)(implicit request: RequestHeader): Future[AuthenticatorResult]

    Permalink

    Updates the authenticator with the new last used date.

    Updates the authenticator with the new last used date.

    If the stateless approach will be used then we update the cookie on the client. With the stateful approach we needn't embed the cookie in the response here because the cookie itself will not be changed. Only the authenticator in the backing store will be changed.

    authenticator

    The authenticator to update.

    result

    The result to manipulate.

    request

    The request header.

    returns

    The original or a manipulated result.

    Definition Classes
    CookieAuthenticatorServiceAuthenticatorService
  29. final def wait(): Unit

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

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

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

Inherited from Logger

Inherited from ExecutionContextProvider

Inherited from AnyRef

Inherited from Any

Ungrouped