play.silhouette.test

Test helpers to test a Silhouette application.

Attributes

Members list

Type members

Classlikes

final case class FakeAuthenticator(loginInfo: LoginInfo, id: String, isValid: Boolean) extends StorableAuthenticator

A fake authenticator.

A fake authenticator.

Value parameters

id

The ID of the authenticator.

isValid

True if the authenticator is valid, false otherwise.

loginInfo

The linked login info for an identity.

Attributes

Companion
object
Supertypes
trait Serializable
trait Product
trait Equals
trait StorableAuthenticator
trait Authenticator
class Object
trait Matchable
class Any
Show all

A fake authenticator factory.

A fake authenticator factory.

Attributes

Companion
class
Supertypes
trait Product
trait Mirror
class Object
trait Matchable
class Any
Self type
class FakeAuthenticatorRepository[T <: StorableAuthenticator] extends AuthenticatorRepository[T]

A fake authenticator repository which persists authenticators in memory.

A fake authenticator repository which persists authenticators in memory.

Type parameters

T

The type of the authenticator to handle.

Attributes

Supertypes
trait AuthenticatorRepository[T]
class Object
trait Matchable
class Any

A fake authenticator service factory.

A fake authenticator service factory.

Attributes

Supertypes
class Object
trait Matchable
class Any
Self type
case object FakeBearerTokenAuthenticatorService extends BearerTokenAuthenticatorService

A fake bearer token authenticator service.

A fake bearer token authenticator service.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class BearerTokenAuthenticatorService
trait Logger
trait AuthenticatorService[BearerTokenAuthenticator]
trait ExecutionContextProvider
class Object
trait Matchable
class Any
Show all
Self type
case object FakeCookieAuthenticatorService extends CookieAuthenticatorService

A fake cookie authenticator service.

A fake cookie authenticator service.

Attributes

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
case object FakeDummyAuthenticatorService extends DummyAuthenticatorService

A fake Dummy authenticator service.

A fake Dummy authenticator service.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class DummyAuthenticatorService
trait AuthenticatorService[DummyAuthenticator]
trait ExecutionContextProvider
class Object
trait Matchable
class Any
Show all
Self type
final case class FakeEnvironment[E <: Env](identities: Seq[(LoginInfo, I[E])], requestProviders: Seq[RequestProvider], eventBus: EventBus)(implicit executionContext: ExecutionContext, tt: Tag[A[E]]) extends Environment[E]

A fake environment implementation.

A fake environment implementation.

Type parameters

E

The type of the environment.

Value parameters

eventBus

The event bus implementation.

executionContext

The execution context to handle the asynchronous operations.

identities

A list of (login info -> identity) pairs to return inside a Silhouette action.

requestProviders

The list of request providers.

tt

The type tag of the authenticator type.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Environment[E]
trait ExecutionContextProvider
class Object
trait Matchable
class Any
Show all
final case class FakeIdentity(loginInfo: LoginInfo) extends Identity

A fake identity.

A fake identity.

Value parameters

loginInfo

The linked login info for an identity.

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
trait Identity
class Object
trait Matchable
class Any
Show all
class FakeIdentityService[I <: Identity](identities: (LoginInfo, I)*) extends IdentityService[I]

A fake identity service implementation which can handle a predefined list of identities.

A fake identity service implementation which can handle a predefined list of identities.

Type parameters

I

The type of the identity to handle.

Value parameters

identities

A list of (login info -> identity) pairs this service is responsible for.

Attributes

Supertypes
trait IdentityService[I]
class Object
trait Matchable
class Any
case object FakeJWTAuthenticatorService extends JWTAuthenticatorService

A fake JWT authenticator service.

A fake JWT authenticator service.

Attributes

Supertypes
trait Singleton
trait Product
trait Mirror
trait Serializable
trait Product
trait Equals
class JWTAuthenticatorService
trait Logger
trait AuthenticatorService[JWTAuthenticator]
trait ExecutionContextProvider
class Object
trait Matchable
class Any
Show all
Self type
implicit class FakeRequestWithAuthenticator[F](f: FakeRequest[F])

Provides a method which add an authenticator to a fake request.

Provides a method which add an authenticator to a fake request.

Type parameters

A

The type of the body.

Value parameters

f

A fake request instance.

Attributes

Supertypes
class Object
trait Matchable
class Any
case object FakeSessionAuthenticatorService extends SessionAuthenticatorService

A fake session authenticator service.

A fake session authenticator service.

Attributes

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

Implicits

Implicits

final implicit def FakeRequestWithAuthenticator[F](f: FakeRequest[F]): FakeRequestWithAuthenticator[F]

Provides a method which add an authenticator to a fake request.

Provides a method which add an authenticator to a fake request.

Type parameters

A

The type of the body.

Value parameters

f

A fake request instance.

Attributes