Session Interface
TheSession interface represents an active user session in Arraf Auth. Sessions are created when users sign in and are used to maintain authentication state.
Unique identifier for the session
The ID of the user this session belongs to. References
User.id.The session token used for authentication. This is the value stored in cookies or passed in Authorization headers.
Timestamp when the session expires. After this time, the session is no longer valid.
The IP address from which the session was created. Useful for security auditing.
The user agent (browser/device information) from which the session was created.
Timestamp when the session was created
Usage Example
Session tokens should be treated as sensitive credentials. Store them securely in httpOnly cookies or secure storage.
The session expiration time is configured in the
AuthConfig.session.expiresIn setting. Sessions can use either database or JWT strategy depending on your configuration.