Class

com.jaroop.play.sentry

CookieTokenAccessor

Related Doc: package sentry

Permalink

class CookieTokenAccessor extends TokenAccessor

A TokenAccessor that stores SignedTokens within cookies.

Linear Supertypes
TokenAccessor, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. CookieTokenAccessor
  2. TokenAccessor
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new CookieTokenAccessor(config: Configuration, signer: CookieSigner)

    Permalink

    config

    An application configuration to supply custom settings for issued cookies, such as security settings, expiration, domain, etc.

    signer

    Requires a CookieSigner to sign the tokens.

    Annotations
    @Inject()

Value Members

  1. final def !=(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  4. final def asInstanceOf[T0]: T0

    Permalink
    Definition Classes
    Any
  5. def clone(): AnyRef

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  6. def delete(result: Result)(implicit request: RequestHeader): Result

    Permalink

    Removes any issued AuthenticityToken or SignedToken from a Result.

    Removes any issued AuthenticityToken or SignedToken from a Result.

    result

    The Result to remove all issued tokens from.

    returns

    A new Result without any issued tokens.

    Definition Classes
    CookieTokenAccessorTokenAccessor
  7. val domain: Option[String]

    Permalink
    Attributes
    protected
  8. final def eq(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean

    Permalink
    Definition Classes
    AnyRef → Any
  10. def extract(request: RequestHeader): Option[AuthenticityToken]

    Permalink

    Attempts to extract an AuthenticityToken from a RequestHeader.

    Attempts to extract an AuthenticityToken from a RequestHeader.

    request

    The RequestHeader to extract the token from.

    returns

    An AuthenticityToken if the request contains a token with a valid signature. Otherwise, None.

    Definition Classes
    CookieTokenAccessorTokenAccessor
  11. def finalize(): Unit

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]

    Permalink
    Definition Classes
    AnyRef → Any
  13. def hashCode(): Int

    Permalink
    Definition Classes
    AnyRef → Any
  14. val httpOnly: Boolean

    Permalink
    Attributes
    protected
  15. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  16. val maxAge: Option[Int]

    Permalink
    Attributes
    protected
  17. val name: String

    Permalink
    Attributes
    protected
  18. final def ne(arg0: AnyRef): Boolean

    Permalink
    Definition Classes
    AnyRef
  19. final def notify(): Unit

    Permalink
    Definition Classes
    AnyRef
  20. final def notifyAll(): Unit

    Permalink
    Definition Classes
    AnyRef
  21. val path: String

    Permalink
    Attributes
    protected
  22. def put(token: AuthenticityToken)(result: Result)(implicit request: RequestHeader): Result

    Permalink

    Puts an AuthenticityToken into a Result to return to a user.

    Puts an AuthenticityToken into a Result to return to a user.

    token

    The AuthenticityToken to be issued to a user.

    returns

    A Result containing a SignedToken or AuthenticityToken.

    Definition Classes
    CookieTokenAccessorTokenAccessor
  23. def safeEquals(a: String, b: String): Boolean

    Permalink
    Attributes
    protected
    Definition Classes
    TokenAccessor
  24. val secure: Boolean

    Permalink
    Attributes
    protected
  25. def sign(token: AuthenticityToken): SignedToken

    Permalink

    Signs an AuthenticityToken and concatenates it with its signature.

    Signs an AuthenticityToken and concatenates it with its signature. ("$${signature}$${token}") The resulting SignedToken is meant to be issued to a user (e.g., within a cookie).

    token

    The AuthenticityToken to sign.

    returns

    The signature of the AuthenticityToken concatenated with the token itself.

    Attributes
    protected
    Definition Classes
    TokenAccessor
  26. val signer: CookieSigner

    Permalink

    Requires a CookieSigner to sign the tokens.

    Requires a CookieSigner to sign the tokens.

    Definition Classes
    CookieTokenAccessorTokenAccessor
  27. final def synchronized[T0](arg0: ⇒ T0): T0

    Permalink
    Definition Classes
    AnyRef
  28. def toString(): String

    Permalink
    Definition Classes
    AnyRef → Any
  29. def verifyHmac(token: SignedToken): Option[AuthenticityToken]

    Permalink

    Verifies that a SignedToken token is valid by comparing the stored signature in the SignedToken to the signature of the raw AuthenticityToken that is part of the SignedToken.

    Verifies that a SignedToken token is valid by comparing the stored signature in the SignedToken to the signature of the raw AuthenticityToken that is part of the SignedToken. In order for any SignedToken to be valid, it must be issued via the TokenAccessor#sign method.

    token

    The SignedToken to validate.

    returns

    The contained AuthenticityToken if the signature is valid, otherwise None.

    Attributes
    protected
    Definition Classes
    TokenAccessor
  30. final def wait(): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  31. final def wait(arg0: Long, arg1: Int): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  32. final def wait(arg0: Long): Unit

    Permalink
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )

Inherited from TokenAccessor

Inherited from AnyRef

Inherited from Any

Ungrouped