Packages

package api

The collection of traits and utility classes that form the stable API of Silhouette.

Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. api
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Package Members

  1. package actions
  2. package crypto
  3. package exceptions

    Provides exceptions used by the API.

  4. package repositories

    Provides repositories used by the API to persist entities.

  5. package services

    Provides services used by the API to call external or internal services.

  6. package util

    Provides utilities used by the API.

Type Members

  1. trait AuthInfo extends AnyRef

    A marker trait for authentication information.

  2. final case class AuthenticatedEvent[I <: Identity](identity: I, request: RequestHeader) extends SilhouetteEvent with Product with Serializable

    An event which will be published if a request passes authentication.

    An event which will be published if a request passes authentication.

    I

    The type of the identity.

    identity

    The logged in identity.

    request

    The request header for the associated request.

  3. trait Authenticator extends AnyRef

    An authenticator recognizes an authenticated user.

  4. trait Authorization[I <: Identity, A <: Authenticator] extends AnyRef

    A trait to define Authorization objects that let you hook an authorization implementation in secured endpoints.

    A trait to define Authorization objects that let you hook an authorization implementation in secured endpoints.

    I

    The type of the identity.

    A

    The type of the authenticator.

  5. trait DefaultErrorHandler extends Results with Status with ContentTypes with RequestExtractors with Rendering

    Provides the base implementation for the default error handlers.

  6. trait DefaultNotAuthenticatedErrorHandler extends NotAuthenticatedErrorHandler with DefaultErrorHandler with I18nSupport with Logger

    Handles not authenticated requests in a default way.

  7. trait DefaultNotAuthorizedErrorHandler extends NotAuthorizedErrorHandler with DefaultErrorHandler with I18nSupport with Logger

    Handles not authorized requests in a default way.

  8. trait Env extends AnyRef

    The environment type.

    The environment type.

    Defines the Identity and Authenticator types for an environment. It is possible to implement as many types as needed. This has the advantage that an application isn't bound only to a single Identity -> Authenticator combination.

    To define a new environment type create a new trait with the appropriate Identity and Authenticator types:

    trait SessionEnv extends Env {
      type I = User
      type A = SessionAuthenticator
    }
    trait JWTEnv extends Env {
      type I = User
      type A = JWTAuthenticator
    }
  9. trait Environment[E <: Env] extends ExecutionContextProvider

    Provides the components needed to handle a secured request.

    Provides the components needed to handle a secured request.

    It's possible to declare different environments for different environment types. The play.silhouette.api.services.IdentityService and the play.silhouette.api.services.AuthenticatorService are bound to the appropriate types defined in the environment type. But the EventBus and the list of RequestProvider instances can be defined as needed for every environment type.

  10. sealed trait ErrorHandler extends AnyRef

    Silhouette error handler.

  11. class EventBus extends ActorEventBus with SubchannelClassification

    An event bus implementation which uses a class based lookup classification.

  12. trait ExpirableAuthenticator extends Authenticator

    An authenticator that may expire.

  13. final case class HandlerResult[+T](result: Result, data: Option[T] = None) extends Product with Serializable

    A result which can transport a result as also additional data through the request handler process.

    A result which can transport a result as also additional data through the request handler process.

    T

    The type of the data.

    result

    A Play Framework result.

    data

    Additional data to transport in the result.

  14. trait Identity extends AnyRef

    This trait represents an authenticated user.

  15. trait Logger extends AnyRef

    Implement this to get a named logger in scope.

  16. final case class LoginEvent[I <: Identity](identity: I, request: RequestHeader) extends SilhouetteEvent with Product with Serializable

    An event which will be published after an identity logged in.

    An event which will be published after an identity logged in.

    I

    The type of the identity.

    identity

    The logged in identity.

    request

    The request header for the associated request.

  17. final case class LoginInfo(providerID: String, providerKey: String) extends Product with Serializable

    Represents a linked login for an identity (i.e.

    Represents a linked login for an identity (i.e. a local username/password or a Facebook/Google account).

    The login info contains the data about the provider that authenticated that identity.

    providerID

    The ID of the provider.

    providerKey

    A unique key which identifies a user on this provider (userID, email, ...).

  18. final case class LogoutEvent[I <: Identity](identity: I, request: RequestHeader) extends SilhouetteEvent with Product with Serializable

    An event which will be published after an identity logged out.

    An event which will be published after an identity logged out.

    I

    The type of the identity.

    identity

    The logged out identity.

    request

    The request header for the associated request.

  19. trait NotAuthenticatedErrorHandler extends ErrorHandler

    Handles errors when a user is not authenticated.

  20. final case class NotAuthenticatedEvent(request: RequestHeader) extends SilhouetteEvent with Product with Serializable

    An event which will be published if a request did not pass authentication.

    An event which will be published if a request did not pass authentication.

    request

    The request header for the associated request.

  21. trait NotAuthorizedErrorHandler extends ErrorHandler

    Handles errors when a user is authenticated but not authorized.

  22. final case class NotAuthorizedEvent[I <: Identity](identity: I, request: RequestHeader) extends SilhouetteEvent with Product with Serializable

    An event which will be published if a request did not pass authorization.

    An event which will be published if a request did not pass authorization.

    I

    The type of the identity.

    identity

    The logged in identity.

    request

    The request header for the associated request.

  23. trait Provider extends AnyRef

    A marker interface for all providers.

  24. trait RequestHandlerBuilder[E <: Env, +R[_]] extends ExecutionContextProvider

    Base implementation for building request handlers.

    Base implementation for building request handlers.

    The base implementations to handle secured endpoints are encapsulated into request handlers which can execute an arbitrary block of code and must return a HandlerResult. This HandlerResult consists of a normal Play result and arbitrary additional data which can be transported out of these handlers.

    E

    The type of the environment.

    R

    The type of the request.

  25. trait RequestProvider extends Provider

    A provider which can be hooked into a request.

    A provider which can be hooked into a request.

    It scans the request for credentials and returns the login info for it.

  26. final case class SignUpEvent[I <: Identity](identity: I, request: RequestHeader) extends SilhouetteEvent with Product with Serializable

    An event which will be published after an identity signed up.

    An event which will be published after an identity signed up.

    I

    The type of the identity.

    identity

    The newly created identity.

    request

    The request header for the associated request.

  27. trait Silhouette[E <: Env] extends AnyRef

    The Silhouette stack.

    The Silhouette stack.

    Inject an instance of this trait into your controller to provide all the Silhouette actions.

    E

    The type of the environment.

  28. trait SilhouetteEvent extends AnyRef

    The base event.

  29. class SilhouetteProvider[E <: Env] extends Silhouette[E]

    Provides the Silhouette stack.

    Provides the Silhouette stack.

    E

    The type of the environment.

  30. trait StorableAuthenticator extends Authenticator

    An authenticator which can be stored in a backing store.

Value Members

  1. object Authenticator

    The Authenticator companion object.

  2. object Authorization

    The companion object.

  3. object Environment

    Companion object to easily create environment instances.

    Companion object to easily create environment instances.

    Environment[SessionEnv](...)
    Environment[JWTEnv](...)
  4. object EventBus

    A global event bus instance.

  5. object LoginInfo extends (String, String) => LoginInfo with Serializable

    The companion object of the login info.

Inherited from AnyRef

Inherited from Any

Ungrouped