Package-level declarations

Types

Link copied to clipboard

Singleton class responsible for managing user authentication state.

Link copied to clipboard
class AuthInterceptor : Interceptor

Interceptor class responsible for adding the Authorization header with the user token to the outgoing requests.

Link copied to clipboard
object Constants

Object containing constant values used in the application.

Link copied to clipboard
data class DecodedHeader(val alg: String, val typ: String)
Link copied to clipboard
data class DecodedPayload(val userId: Int, val email: String, val role: String, val iat: Int, val exp: Int)
Link copied to clipboard
sealed class Resource<T>

A sealed class representing different states of a resource.

Functions

Link copied to clipboard

Decodes the payload of a JWT (JSON Web Token) and returns a DecodedPayload object.

Link copied to clipboard

Checks whether a given JWT is valid based on its expiration time.