package test
Test helpers to test a Silhouette application.
- Alphabetic
- By Inheritance
- test
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Type Members
- case class FakeAuthenticator(loginInfo: LoginInfo, id: String = UUID.randomUUID().toString, isValid: Boolean = true) extends StorableAuthenticator with Product with Serializable
A fake authenticator.
A fake authenticator.
- loginInfo
The linked login info for an identity.
- id
The ID of the authenticator.
- isValid
True if the authenticator is valid, false otherwise.
- 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.
- T
The type of the authenticator to handle.
- case class FakeBearerTokenAuthenticatorService() extends BearerTokenAuthenticatorService with Product with Serializable
A fake bearer token authenticator service.
- case class FakeCookieAuthenticatorService() extends CookieAuthenticatorService with Product with Serializable
A fake cookie authenticator service.
- case class FakeDummyAuthenticatorService() extends DummyAuthenticatorService with Product with Serializable
A fake Dummy authenticator service.
- case class FakeEnvironment[E <: Env](identities: Seq[(LoginInfo, E.I)], requestProviders: Seq[RequestProvider] = Seq(), eventBus: EventBus = EventBus())(implicit executionContext: ExecutionContext, tt: scala.reflect.api.JavaUniverse.TypeTag[E.A]) extends Environment[E] with Product with Serializable
A fake environment implementation.
A fake environment implementation.
- E
The type of the environment.
- identities
A list of (login info -> identity) pairs to return inside a Silhouette action.
- requestProviders
The list of request providers.
- eventBus
The event bus implementation.
- executionContext
The execution context to handle the asynchronous operations.
- tt
The type tag of the authenticator type.
- case class FakeIdentity(loginInfo: LoginInfo) extends Identity with Product with Serializable
A fake identity.
A fake identity.
- loginInfo
The linked login info for an identity.
- class FakeIdentityService[I <: Identity] 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.
- I
The type of the identity to handle.
- case class FakeJWTAuthenticatorService() extends JWTAuthenticatorService with Product with Serializable
A fake JWT authenticator service.
- implicit class FakeRequestWithAuthenticator[A] extends AnyRef
Provides a method which add an authenticator to a fake request.
Provides a method which add an authenticator to a fake request.
- A
The type of the body.
- case class FakeSessionAuthenticatorService() extends SessionAuthenticatorService with Product with Serializable
A fake session authenticator service.
Value Members
- implicit def await[T](f: Future[T]): T
Resolves a future by waiting of the result.
Resolves a future by waiting of the result.
- T
The type contained in the future.
- f
The future to block.
- returns
The value contained in the future.
- Attributes
- protected
- object FakeAuthenticator extends Serializable
A fake authenticator factory.
- object FakeAuthenticatorService
A fake authenticator service factory.