Packages

  • package root
    Definition Classes
    root
  • package play
    Definition Classes
    root
  • package silhouette

    An authentication library for Play Framework applications that supports several authentication methods, including OAuth1, OAuth2, OpenID, Credentials or custom authentication schemes.

    An authentication library for Play Framework applications that supports several authentication methods, including OAuth1, OAuth2, OpenID, Credentials or custom authentication schemes.

    Definition Classes
    play
  • package api

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

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

    Definition Classes
    silhouette
  • package services

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

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

    Definition Classes
    api
  • AuthenticatorResult
  • AuthenticatorService
  • AvatarService
  • IdentityService

trait AuthenticatorService[T <: Authenticator] extends ExecutionContextProvider

Handles authenticators for the Silhouette module.

T

The type of the authenticator this service is responsible for.

Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. AuthenticatorService
  2. ExecutionContextProvider
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. Protected

Abstract Value Members

  1. abstract def create(loginInfo: LoginInfo)(implicit request: RequestHeader): Future[T]

    Creates a new authenticator for the specified login info.

    Creates a new authenticator for the specified login info.

    loginInfo

    The login info for which the authenticator should be created.

    request

    The request header.

    returns

    An authenticator.

  2. abstract def discard(authenticator: T, result: Result)(implicit request: RequestHeader): Future[AuthenticatorResult]

    Manipulates the response and removes authenticator specific artifacts before sending it to the client.

    Manipulates the response and removes authenticator specific artifacts before sending it to the client.

    authenticator

    The authenticator instance.

    result

    The result to manipulate.

    request

    The request header.

    returns

    The manipulated result.

  3. abstract def embed(value: T.Value, request: RequestHeader): RequestHeader

    Embeds authenticator specific artifacts into the request.

    Embeds authenticator specific artifacts into the request.

    This method can be used to embed an authenticator in a existing request. This can be useful in Play filters. So before executing a SecuredAction we can embed the authenticator in the request to lead the action to believe that the request is a new request which contains a valid authenticator.

    If an existing authenticator exists, then it will be overridden.

    value

    The authenticator value to embed.

    request

    The request header.

    returns

    The manipulated request header.

  4. abstract def embed(value: T.Value, result: Result)(implicit request: RequestHeader): Future[AuthenticatorResult]

    Embeds authenticator specific artifacts into the response.

    Embeds authenticator specific artifacts into the response.

    value

    The authenticator value to embed.

    result

    The result to manipulate.

    request

    The request header.

    returns

    The manipulated result.

  5. implicit abstract val executionContext: ExecutionContext

    The execution context to handle the asynchronous operations.

    The execution context to handle the asynchronous operations.

    Definition Classes
    ExecutionContextProvider
  6. abstract def init(authenticator: T)(implicit request: RequestHeader): Future[T.Value]

    Initializes an authenticator and instead of embedding into the the request or result, it returns the serialized value.

    Initializes an authenticator and instead of embedding into the the request or result, it returns the serialized value.

    authenticator

    The authenticator instance.

    request

    The request header.

    returns

    The serialized authenticator value.

  7. abstract def renew(authenticator: T, result: Result)(implicit request: RequestHeader): Future[AuthenticatorResult]

    Renews the expiration of an authenticator.

    Renews the expiration of an authenticator.

    Based on the implementation, the renew method should revoke the given authenticator first, before creating a new one. If the authenticator was updated, then the updated artifacts should be embedded into the response.

    authenticator

    The authenticator to renew.

    result

    The result to manipulate.

    request

    The request header.

    returns

    The original or a manipulated result.

  8. abstract def renew(authenticator: T)(implicit request: RequestHeader): Future[T.Value]

    Renews the expiration of an authenticator without embedding it into the result.

    Renews the expiration of an authenticator without embedding it into the result.

    Based on the implementation, the renew method should revoke the given authenticator first, before creating a new one. If the authenticator was updated, then the updated artifacts should be returned.

    authenticator

    The authenticator to renew.

    request

    The request header.

    returns

    The serialized expression of the authenticator.

  9. abstract def retrieve[B](implicit request: ExtractableRequest[B]): Future[Option[T]]

    Retrieves the authenticator from request.

    Retrieves the authenticator from request.

    B

    The type of the request body.

    request

    The request to retrieve the authenticator from.

    returns

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

  10. abstract def touch(authenticator: T): Either[T, T]

    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.

    authenticator

    The authenticator to touch.

    returns

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

  11. abstract def update(authenticator: T, result: Result)(implicit request: RequestHeader): Future[AuthenticatorResult]

    Updates a touched authenticator.

    Updates a touched authenticator.

    If the authenticator was updated, then the updated artifacts should be embedded into the response. This method gets called on every subsequent request if an identity accesses a Silhouette action, expect the authenticator was not touched.

    authenticator

    The authenticator to update.

    result

    The result to manipulate.

    request

    The request header.

    returns

    The original or a manipulated result.

Concrete Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##: Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  5. def clone(): AnyRef
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
  6. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  7. def equals(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef → Any
  8. final def getClass(): Class[_ <: AnyRef]
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  9. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  10. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  11. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  12. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  13. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @HotSpotIntrinsicCandidate() @native()
  14. final def synchronized[T0](arg0: => T0): T0
    Definition Classes
    AnyRef
  15. def toString(): String
    Definition Classes
    AnyRef → Any
  16. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])
  17. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException]) @native()
  18. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.InterruptedException])

Deprecated Value Members

  1. def finalize(): Unit
    Attributes
    protected[lang]
    Definition Classes
    AnyRef
    Annotations
    @throws(classOf[java.lang.Throwable]) @Deprecated
    Deprecated

    (Since version 9)

Inherited from AnyRef

Inherited from Any

Ungrouped