Domain Documentation

Class Verified​User

public final class VerifiedUser  

Authenticated user information.

APIs that require the logged-in user's own information to complete the process automatically query the user information through Middleware and relay the information to the controller. @see AuthenticateThenSearchUserMiddleware for detail.

Note

User is a struct and has no id. This class was prepared because I wanted to use it without changing the swagger definition.

Nested Types

VerifiedUser.Key

Initializers

init(id:​email:​token:​username:​bio:​image:​)

public init(id: Int = 0, email: String = "", token: String = "", username: String = "", bio: String = "", image: String = "")  

Default initalizer.

Parameters

id Int

Users Id.

email String

Users email.

token String

Verified JWT.

username String

Users username.

bio String

Users bio.

image String

Users image.

Properties

id

public var id: Int

Same as Users id.

email

public var email: String

Same as Users email.

token

public var token: String

JWT used for authentication.

username

public var username: String

Same as Users username.

bio

public var bio: String

Same as Users bio.

image

public var image: String

Same as Users image.

user

public var user: User  

Export to User.