Packages

abstract class ScodecTokenAuthenticator[A] extends TokenAuthenticator[String, A]

Token authenticator that uses Scodec encoding and then base-64 encodes the result to a String token.

A

The result of successful authentication (ex: User, AccessToken)

Source
ScodecTokenAuthenticator.scala
Linear Supertypes
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. ScodecTokenAuthenticator
  2. TokenAuthenticator
  3. AnyRef
  4. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new ScodecTokenAuthenticator()

Abstract Value Members

  1. abstract def codec: Codec[A]

    A codec to encode/decode tokens

  2. abstract def validate(a: A): AuthResult[Unit]

    Validate a result.

    Validate a result.

    This method is called at the end of the authenticate method to ensure that any domain rules are satisfied. For example, this can be used to verify that a token hasn't expired.

    returns

    an authentication failure on the left if there is an error, otherwise Unit on the right.

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 authenticate(base64Token: String): AuthResult[A]

    Decode and validate a token.

    Decode and validate a token.

    base64Token

    a base-64 encoded token, as returned by the serialize method.

    Definition Classes
    ScodecTokenAuthenticatorTokenAuthenticator
  6. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  7. def decode(tokenBits: BitVector): AuthResult[A]
  8. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  9. def equals(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  11. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  12. def hashCode(): Int
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  15. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  16. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  17. def serialize(token: A): Either[String, String]

    Serialize a token.

    Serialize a token.

    returns

    an error message on the left if serialization fails, otherwise a base-64 endoded token on the right.

    Definition Classes
    ScodecTokenAuthenticatorTokenAuthenticator
  18. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  19. def toString(): String
    Definition Classes
    AnyRef → Any
  20. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  21. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  22. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from TokenAuthenticator[String, A]

Inherited from AnyRef

Inherited from Any

Ungrouped