Skip to content

Schemas

All the schemas available via Esmerald Simple JWT and used accross the package.

esmerald_simple_jwt.schemas.AccessToken

Bases: BaseModel

The representation of an access token.

When model_dump() is called, it will generate a python like dictionary.

{
    "access_token": ...
}

access_token instance-attribute

access_token

esmerald_simple_jwt.schemas.RefreshToken

Bases: BaseModel

The representation of a refresh token.

When model_dump() is called, it will generate a python like dictionary.

{
    "refresh_token": ...
}

refresh_token instance-attribute

refresh_token

esmerald_simple_jwt.schemas.TokenAccess

Bases: AccessToken, RefreshToken

The representation of token access used by the signin response.

When model_dump() is called, it will generate a python like dictionary.

{
    "access_token": ...,
    "refresh_token": ...,
}

esmerald_simple_jwt.schemas.LoginEmailIn

Bases: BaseModel

The representation of a login payload used by the signin endpoint when using an email backend for validation. When the endpoint is called via POST it should contain the following.

{
    "email": ...,
    "password": ...
}

email instance-attribute

email

password instance-attribute

password

esmerald_simple_jwt.schemas.LoginUserIn

Bases: BaseModel

The representation of a login payload used by the signin endpoint when using an username backend for validation. When the endpoint is called via POST it should contain the following.

{
    "username": ...,
    "password": ...
}

username instance-attribute

username

password instance-attribute

password