p

tsec

authentication

package authentication

Source
package.scala
Linear Supertypes
AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. authentication
  2. AnyRef
  3. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Type Members

  1. final case class AugmentedJWT[A, I](id: SecureRandomId, jwt: JWTMac[A], identity: I, expiry: Instant, lastTouched: Option[Instant]) extends Product with Serializable

    An Authenticator that wraps a JWTMAC[A]

  2. final case class AuthEncryptedCookie[A, Id](id: UUID, name: String, content: AEADCookie[A], identity: Id, expiry: Instant, lastTouched: Option[Instant], secure: Boolean, httpOnly: Boolean = true, domain: Option[String] = None, path: Option[String] = None, extension: Option[String] = None) extends Product with Serializable

    An authenticated cookie implementation

    An authenticated cookie implementation

    id

    the cookie id

    content

    the raw cookie: The full thing, including the nonce

    identity

    The id of what

  3. trait AuthToken[A] extends AnyRef

    Authenticators represent something similar to a Token: Some piece of Id that you can use to identify a user with.

    Authenticators represent something similar to a Token: Some piece of Id that you can use to identify a user with. The only thing all authenticators have in common is that they all have some eventual expiry date, as well as _possibly_ a lastTouched date.

    An Authenticator can be a bearer token, a JWT, an encrypted cookie or a signed cookie in TSec.

  4. final case class AuthenticatedCookie[A, Id](id: UUID, name: String, content: SignedCookie[A], identity: Id, expiry: Instant, lastTouched: Option[Instant], secure: Boolean, httpOnly: Boolean = true, domain: Option[String] = None, path: Option[String] = None, extension: Option[String] = None) extends Product with Serializable

    An authenticated cookie implementation

    An authenticated cookie implementation

    A

    Our Mac algorithm we are signing the cookie with.

    id

    the cookie id

    content

    the raw cookie: The full thing, including the nonce

    identity

    The id of what

  5. abstract class Authenticator[F[_], I, V, A] extends AnyRef

    A base typeclass for generating authenticators, i.e cookies, tokens, JWTs etc.

    A base typeclass for generating authenticators, i.e cookies, tokens, JWTs etc.

    I

    The Identifier type

    V

    The value type, i.e user, or possibly only partial information

    A

    the type of authenticator

  6. implicit final class AuthenticatorSyntax[A] extends AnyVal
  7. trait BackingStore[F[_], I, V] extends IdentityStore[F, I, V]
  8. sealed abstract class BearerTokenAuthenticator[F[_], I, V] extends Authenticator[F, I, V, TSecBearerToken[I]]
  9. sealed abstract class EncryptedCookieAuthenticator[F[_], I, V, A] extends Authenticator[F, I, V, AuthEncryptedCookie[A, I]]
  10. trait IdentityStore[F[_], I, V] extends AnyRef
  11. abstract class JWTAuthenticator[F[_], I, V, A] extends Authenticator[F, I, V, AugmentedJWT[A, I]]

    Note: Not sealed in case of user-defined custom behavior

  12. final case class SecuredRequest[F[_], Identity, Auth](request: Request[F], identity: Identity, authenticator: Auth) extends Product with Serializable

    Inspired from the Silhouette SecuredRequest

  13. sealed abstract class SecuredRequestHandler[F[_], Identity, User, Auth] extends AnyRef
  14. abstract class SignedCookieAuthenticator[F[_], I, V, A] extends Authenticator[F, I, V, AuthenticatedCookie[A, I]]
  15. sealed abstract class StatefulECAuthenticator[F[_], I, V, A] extends EncryptedCookieAuthenticator[F, I, V, A]
  16. sealed abstract class StatelessECAuthenticator[F[_], I, V, A] extends EncryptedCookieAuthenticator[F, I, V, A]
  17. type TSecAuthService[I, A, F[_]] = Kleisli[[β$3$]OptionT[F, β$3$], SecuredRequest[F, I, A], Response[F]]
  18. final case class TSecBearerToken[I](id: SecureRandomId, identity: I, expiry: Instant, lastTouched: Option[Instant]) extends Product with Serializable
  19. final case class TSecCookieSettings(cookieName: String = "tsec-auth-cookie", secure: Boolean, httpOnly: Boolean = true, domain: Option[String] = None, path: Option[String] = None, extension: Option[String] = None, expiryDuration: FiniteDuration, maxIdle: Option[FiniteDuration]) extends Product with Serializable

    Common cookie settings for cookie-based authenticators

  20. final case class TSecJWTSettings(headerName: String = "X-TSec-JWT", expiryDuration: FiniteDuration, maxIdle: Option[FiniteDuration]) extends Product with Serializable
  21. type TSecMiddleware[F[_], I, A] = (Kleisli[[β$0$]OptionT[F, β$0$], SecuredRequest[F, I, A], Response[F]]) ⇒ Kleisli[[β$0$]OptionT[F, β$0$], Request[F], Response[F]]
  22. final case class TSecTokenSettings(expiryDuration: FiniteDuration, maxIdle: Option[FiniteDuration]) extends Product with Serializable
  23. type UserAwareMiddleware[F[_], I, A] = (Kleisli[[β$5$]OptionT[F, β$5$], UserAwareRequest[F, I, A], Response[F]]) ⇒ Kleisli[[β$5$]OptionT[F, β$5$], Request[F], Response[F]]
  24. final case class UserAwareRequest[F[_], Identity, Auth](request: Request[F], maybe: Option[(Identity, Auth)]) extends Product with Serializable
  25. type UserAwareService[I, A, F[_]] = Kleisli[[β$4$]OptionT[F, β$4$], UserAwareRequest[F, I, A], Response[F]]

Value Members

  1. def buildBearerAuthHeader(content: String): Authorization
  2. def cookieFromRequest[F[_]](name: String, request: Request[F])(implicit arg0: Monad[F]): OptionT[F, RequestCookie]
  3. def extractBearerToken[F[_]](request: Request[F])(implicit arg0: Monad[F]): Option[String]
  4. def unliftedCookieFromRequest[F[_]](name: String, request: Request[F]): Option[RequestCookie]
  5. object AugmentedJWT extends Serializable
  6. object AuthEncryptedCookie extends Serializable
  7. object AuthenticatedCookie extends Serializable
  8. object BearerTokenAuthenticator
  9. object EncryptedCookieAuthenticator
  10. object JWTAuthenticator
  11. object SecuredRequestHandler
  12. object SignedCookieAuthenticator
  13. object TSecAuthService
  14. object TSecBearerToken extends Serializable
  15. object TSecMiddleware
  16. object UserAwareService
  17. object asAuthed
  18. object asAware

Inherited from AnyRef

Inherited from Any

Ungrouped