AuthUser

object AuthUser

Functions

login
Link copied to clipboard
suspend fun login(model: SecurityModel)

Set tokens

logout
Link copied to clipboard
suspend fun logout()

Clear tokens

refresh
Link copied to clipboard
suspend fun refresh(model: SecurityModel)

Refresh model

singleCollectAuth
Link copied to clipboard
suspend fun singleCollectAuth(action: suspend (value: AuthUser) -> Unit)

Auth user collect

singleCollectRefresh
Link copied to clipboard
suspend fun singleCollectRefresh(action: suspend (value: SecurityModel) -> Unit)

Refresh user collect

Properties

DATA
Link copied to clipboard
private var DATA: SecurityModel? = null

Auth token

data
Link copied to clipboard
val data: SecurityModel?

Get value for DATA

isLogin
Link copied to clipboard
val isLogin: Boolean

Get user is login

jobAuth
Link copied to clipboard
private var jobAuth: Job? = null
jobRefresh
Link copied to clipboard
private var jobRefresh: Job? = null
STATE
Link copied to clipboard
private val STATE: MutableSharedFlow<AuthUser>

For listen and relations with db

STATE_REFRESH
Link copied to clipboard
private val STATE_REFRESH: MutableSharedFlow<AuthUser>

For listen refresh and relations with db