FakeCookieAuthenticatorService

play.silhouette.test.FakeCookieAuthenticatorService
case object FakeCookieAuthenticatorService extends CookieAuthenticatorService

A fake cookie authenticator service.

Attributes

Graph
Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class CookieAuthenticatorService
trait Logger
trait AuthenticatorService[CookieAuthenticator]
trait ExecutionContextProvider
class Object
trait Matchable
class Any
Show all
Self type

Members list

Type members

Inherited types

type MirroredElemLabels = EmptyTuple

The names of the product elements

The names of the product elements

Attributes

Inherited from:
Singleton
type MirroredElemTypes = EmptyTuple

Attributes

Inherited from:
Singleton
type MirroredLabel <: String

The name of the type

The name of the type

Attributes

Inherited from:
Mirror
type MirroredMonoType = Singleton.this.type

The mirrored *-type

The mirrored *-type

Attributes

Inherited from:
Singleton
type MirroredType = Singleton.this.type

Attributes

Inherited from:
Singleton

Value members

Inherited methods

override def create(loginInfo: LoginInfo)(implicit request: RequestHeader): Future[CookieAuthenticator]

Creates a new authenticator for the specified login info.

Creates a new authenticator for the specified login info.

Value parameters

loginInfo

The login info for which the authenticator should be created.

request

The request header.

Attributes

Returns

An authenticator.

Definition Classes
CookieAuthenticatorService -> AuthenticatorService
Inherited from:
CookieAuthenticatorService
override def discard(authenticator: CookieAuthenticator, result: Result)(implicit request: RequestHeader): Future[AuthenticatorResult]

Discards the cookie.

Discards the cookie.

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

Value parameters

request

The request header.

result

The result to manipulate.

Attributes

Returns

The manipulated result.

Definition Classes
CookieAuthenticatorService -> AuthenticatorService
Inherited from:
CookieAuthenticatorService
override def embed(cookie: Cookie, request: RequestHeader): RequestHeader

Embeds the cookie into the request.

Embeds the cookie into the request.

Value parameters

cookie

The cookie to embed.

request

The request header.

Attributes

Returns

The manipulated request header.

Definition Classes
CookieAuthenticatorService -> AuthenticatorService
Inherited from:
CookieAuthenticatorService
override def embed(cookie: Cookie, result: Result)(implicit request: RequestHeader): Future[AuthenticatorResult]

Embeds the cookie into the result.

Embeds the cookie into the result.

Value parameters

cookie

The cookie to embed.

request

The request header.

result

The result to manipulate.

Attributes

Returns

The manipulated result.

Definition Classes
CookieAuthenticatorService -> AuthenticatorService
Inherited from:
CookieAuthenticatorService
def fromProduct(p: Product): MirroredMonoType

Create a new instance of type T with elements taken from product p.

Create a new instance of type T with elements taken from product p.

Attributes

Inherited from:
Singleton
override def init(authenticator: CookieAuthenticator)(implicit request: RequestHeader): Future[Cookie]

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.

Value parameters

authenticator

The authenticator instance.

request

The request header.

Attributes

Returns

The serialized authenticator value.

Definition Classes
CookieAuthenticatorService -> AuthenticatorService
Inherited from:
CookieAuthenticatorService
def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
override def renew(authenticator: CookieAuthenticator, result: Result)(implicit request: RequestHeader): Future[AuthenticatorResult]

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.

Value parameters

authenticator

The authenticator to update.

request

The request header.

result

The result to manipulate.

Attributes

Returns

The original or a manipulated result.

Definition Classes
CookieAuthenticatorService -> AuthenticatorService
Inherited from:
CookieAuthenticatorService
override def renew(authenticator: CookieAuthenticator)(implicit request: RequestHeader): Future[Cookie]

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.

Value parameters

authenticator

The authenticator to renew.

request

The request header.

Attributes

Returns

The serialized expression of the authenticator.

Definition Classes
CookieAuthenticatorService -> AuthenticatorService
Inherited from:
CookieAuthenticatorService
override def retrieve[B](implicit request: ExtractableRequest[B]): Future[Option[CookieAuthenticator]]

Retrieves the authenticator from request.

Retrieves the authenticator from request.

Type parameters

B

The type of the request body.

Value parameters

request

The request to retrieve the authenticator from.

Attributes

Returns

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

Definition Classes
CookieAuthenticatorService -> AuthenticatorService
Inherited from:
CookieAuthenticatorService
override def touch(authenticator: CookieAuthenticator): Either[CookieAuthenticator, CookieAuthenticator]

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.

Value parameters

authenticator

The authenticator to touch.

Attributes

Returns

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

Definition Classes
CookieAuthenticatorService -> AuthenticatorService
Inherited from:
CookieAuthenticatorService
override def update(authenticator: CookieAuthenticator, result: Result)(implicit request: RequestHeader): Future[AuthenticatorResult]

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.

Value parameters

authenticator

The authenticator to update.

request

The request header.

result

The result to manipulate.

Attributes

Returns

The original or a manipulated result.

Definition Classes
CookieAuthenticatorService -> AuthenticatorService
Inherited from:
CookieAuthenticatorService

Inherited fields

val logger: Logger

A named logger instance.

A named logger instance.

Attributes

Inherited from:
Logger

Implicits

Inherited implicits

implicit val executionContext: ExecutionContext

The execution context to handle the asynchronous operations.

The execution context to handle the asynchronous operations.

Attributes

Inherited from:
CookieAuthenticatorService