Class/Object

nelson.crypto.protocol

ScodecTokenAuthenticator

Related Docs: object ScodecTokenAuthenticator | package protocol

Permalink

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)

Linear Supertypes
TokenAuthenticator[String, A], AnyRef, Any
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()

    Permalink

Abstract Value Members

  1. abstract def codec: Codec[A]

    Permalink

    A codec to encode/decode tokens

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

    Permalink

    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

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

    Permalink

    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

    Permalink
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  7. def decode(tokenBits: BitVector): AuthResult[A]

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  10. def finalize(): Unit

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

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

    Permalink
    Definition Classes
    AnyRef → Any
  13. final def isInstanceOf[T0]: Boolean

    Permalink
    Definition Classes
    Any
  14. final def ne(arg0: AnyRef): Boolean

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

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

    Permalink
    Definition Classes
    AnyRef
  17. def serialize(token: A): Either[String, String]

    Permalink

    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

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

    Permalink
    Definition Classes
    AnyRef → Any
  20. final def wait(): Unit

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

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

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

Inherited from TokenAuthenticator[String, A]

Inherited from AnyRef

Inherited from Any

Ungrouped