Skip to main content

AdminUser

Properties

dbUser

dbUser: any

User record fetched from database, from resource defined in AdminForthConfig.auth.usersResourceId


executedBy?

optional executedBy?: string

Optional software actor executing an action on behalf of this user. For example, af-agent or codex@1.2.3 | Production Codex.


exp?

optional exp?: number

Unix time (in seconds) when auth token of this session expires, as it is stored in auth JWT. Not defined for users which were not authorized by auth token, e.g. external users (AdminUser.isExternalUser).


isExternalUser?

optional isExternalUser?: boolean

Flag which indicates that this user is not real user from database, but external user from e.g. custom website. True here is not possible in AdminForth built-in functions, auth middleware etc. True value is only possible in your need to tell AdminForth that this is not real "fake" admin user


pk

pk: string

primaryKey field value of user in table which is defined by AdminForthConfig.auth.usersResourceId


sessionId?

optional sessionId?: string

Unique id of login session, generated when auth cookie is issued and stored in auth JWT. Same for all requests done with one login, changes on next login. Use it to track or revoke individual sessions, e.g. in AdminForthConfig.auth.beforeLogout hook.

Not defined for sessions which were issued before session ids were introduced, and for external users (AdminUser.isExternalUser).


username

username: string

Username which taken from AdminForthConfig.auth.usernameField field in user resource AdminForthConfig.auth.usersResourceId