Package

com.mohiva.play.silhouette

api

Permalink

package api

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

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

Type Members

  1. trait AuthInfo extends AnyRef

    Permalink

    A marker trait for authentication information.

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

    Permalink

    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

    Permalink

    An authenticator recognizes an authenticated user.

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

    Permalink

    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

    Permalink

    Provides the base implementation for the default error handlers.

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

    Permalink

    Handles not authenticated requests in a default way.

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

    Permalink

    Handles not authorized requests in a default way.

  8. trait Env extends AnyRef

    Permalink

    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

    Permalink

    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 com.mohiva.play.silhouette.api.services.IdentityService and the com.mohiva.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

    Permalink

    Silhouette error handler.

  11. class EventBus extends ActorEventBus with SubchannelClassification

    Permalink

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

  12. trait ExpirableAuthenticator extends Authenticator

    Permalink

    An authenticator that may expire.

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

    Permalink

    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

    Permalink

    This trait represents an authenticated user.

  15. trait Logger extends AnyRef

    Permalink

    Implement this to get a named logger in scope.

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

    Permalink

    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. case class LoginInfo(providerID: String, providerKey: String) extends Product with Serializable

    Permalink

    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. case class LogoutEvent[I <: Identity](identity: I, request: RequestHeader) extends SilhouetteEvent with Product with Serializable

    Permalink

    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

    Permalink

    Handles errors when a user is not authenticated.

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

    Permalink

    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

    Permalink

    Handles errors when a user is authenticated but not authorized.

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

    Permalink

    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

    Permalink

    A marker interface for all providers.

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

    Permalink

    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

    Permalink

    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. case class SignUpEvent[I <: Identity](identity: I, request: RequestHeader) extends SilhouetteEvent with Product with Serializable

    Permalink

    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

    Permalink

    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

    Permalink

    The base event.

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

    Permalink

    Provides the Silhouette stack.

    Provides the Silhouette stack.

    E

    The type of the environment.

  30. trait StorableAuthenticator extends Authenticator

    Permalink

    An authenticator which can be stored in a backing store.

Value Members

  1. object Authenticator

    Permalink

    The Authenticator companion object.

  2. object Authorization

    Permalink

    The companion object.

  3. object Environment

    Permalink

    Companion object to easily create environment instances.

    Companion object to easily create environment instances.

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

    Permalink

    A global event bus instance.

  5. object LoginInfo extends (String, String) ⇒ LoginInfo with Serializable

    Permalink

    The companion object of the login info.

  6. package actions

    Permalink
  7. package crypto

    Permalink
  8. package exceptions

    Permalink

    Provides exceptions used by the API.

  9. package repositories

    Permalink

    Provides repositories used by the API to persist entities.

  10. package services

    Permalink

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

  11. package util

    Permalink

    Provides utilities used by the API.

Inherited from AnyRef

Inherited from Any

Ungrouped