AuthServiceImpl

class AuthServiceImpl(authRepository: AuthRepository, secret: Secret, issuer: Issuer, audience: Audience, expirationTime: Int = EXPIRATION_TIME) : AuthService

Implementation of the AuthService interface.

Constructors

Link copied to clipboard
constructor(authRepository: AuthRepository, secret: Secret, issuer: Issuer, audience: Audience, expirationTime: Int = EXPIRATION_TIME)

Functions

Link copied to clipboard
open override fun authenticate(email: String, password: String): String?

Authenticates a user by their email and password.

Link copied to clipboard
open override fun authorize(token: String): Boolean

Authorizes a user by verifying their JWT token.

Link copied to clipboard
open override fun getEmailFromToken(token: String): String?

Extracts the email from a given JWT token.